mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 00:12:50 +01:00
4757061c47
threading of shifts over selects and phis while there. This fires here and there in the testsuite, to not much effect. For example when compiling spirit it fires 5 times, during early-cse, resulting in 6 more cse simplifications, and 3 more terminators being folded by jump threading, but the final bitcode doesn't change in any interesting way: other optimizations would have caught the opportunity anyway, only later. llvm-svn: 123441
10 lines
202 B
LLVM
10 lines
202 B
LLVM
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
|
|
|
define i32 @shift_select(i1 %cond) {
|
|
; CHECK: @shift_select
|
|
%s = select i1 %cond, i32 0, i32 1
|
|
%r = lshr i32 %s, 1
|
|
ret i32 %r
|
|
; CHECK: ret i32 0
|
|
}
|