; This test makes sure that add instructions are properly eliminated.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
+; RUN: opt < %s -instcombine -S | \
; RUN: grep -v OK | not grep add
define i32 @test1(i32 %A) {
ret i32 %tmp2
}
+define i32 @test36(i32 %a) {
+ %x = and i32 %a, -2
+ %y = and i32 %a, -126
+ %z = add i32 %x, %y
+ %q = and i32 %z, 1 ; always zero
+ ret i32 %q
+}