diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/icmp.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/icmp.ll | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll index 780529c9de6..a8d55b13c26 100644 --- a/llvm/test/Transforms/InstCombine/icmp.ll +++ b/llvm/test/Transforms/InstCombine/icmp.ll @@ -518,6 +518,26 @@ define <2 x i1> @test40vec(<2 x i32> %X, <2 x i32> %Y) {    ret <2 x i1> %B  } +define i1 @shr_exact(i132 %x) { +; CHECK-LABEL: @shr_exact( +; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i132 %x, 32 +; CHECK-NEXT:    ret i1 [[CMP]] +; +  %sh = ashr exact i132 %x, 4 +  %cmp = icmp eq i132 %sh, 2 +  ret i1 %cmp +} + +define <2 x i1> @shr_exact_vec(<2 x i132> %x) { +; CHECK-LABEL: @shr_exact_vec( +; CHECK-NEXT:    [[CMP:%.*]] = icmp ne <2 x i132> %x, <i132 32, i132 32> +; CHECK-NEXT:    ret <2 x i1> [[CMP]] +; +  %sh = lshr exact <2 x i132> %x, <i132 4, i132 4> +  %cmp = icmp ne <2 x i132> %sh, <i132 2, i132 2> +  ret <2 x i1> %cmp +} +  ; PR9343 #3  define i1 @test41(i32 %X, i32 %Y) {  ; CHECK-LABEL: @test41( | 

