about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-29 12:31:56 +0000
committerbors <bors@rust-lang.org>2020-08-29 12:31:56 +0000
commit286a346d00ea534985195f3d72f4e1c5f3b07e2e (patch)
tree66097f666cb1b4daa16d3833d0905cdbb59f857a /compiler/rustc_codegen_llvm/src
parent65d071eeb52eba78896dd09b95a80c647ef150e9 (diff)
parent23dda1b9c64ab1f5a58bc19535792aee05254167 (diff)
downloadrust-286a346d00ea534985195f3d72f4e1c5f3b07e2e.tar.gz
rust-286a346d00ea534985195f3d72f4e1c5f3b07e2e.zip
Auto merge of #75370 - simonvandel:optimize-if-condition-on-int-to-switch, r=oli-obk
New pass to optimize `if`conditions on integrals to switches on the integer

Fixes #75144

 Pass to convert `if` conditions on integrals into switches on the integral.
 For an example, it turns something like

 ```
 _3 = Eq(move _4, const 43i32);
 StorageDead(_4);
 switchInt(_3) -> [false: bb2, otherwise: bb3];
 ```

 into:

 ```
 switchInt(_4) -> [43i32: bb3, otherwise: bb2];
 ```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions