[llvm-commits] [llvm] r83796 - in /llvm/trunk/test/Transforms/InstCombine: 2006-11-27-XorBug.ll xor2.ll
Chris Lattner
sabre at nondot.org
Sun Oct 11 14:42:08 PDT 2009
Author: lattner
Date: Sun Oct 11 16:42:08 2009
New Revision: 83796
URL: http://llvm.org/viewvc/llvm-project?rev=83796&view=rev
Log:
convert xor2 to filecheck, merge in a random regtest
Removed:
llvm/trunk/test/Transforms/InstCombine/2006-11-27-XorBug.ll
Modified:
llvm/trunk/test/Transforms/InstCombine/xor2.ll
Removed: llvm/trunk/test/Transforms/InstCombine/2006-11-27-XorBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2006-11-27-XorBug.ll?rev=83795&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2006-11-27-XorBug.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/2006-11-27-XorBug.ll (removed)
@@ -1,12 +0,0 @@
-; RUN: opt < %s -instcombine -S | grep and.*32
-; RUN: opt < %s -instcombine -S | \
-; RUN: not grep or.*153
-; PR1014
-
-define i32 @test(i32 %tmp1) {
- %ovm = and i32 %tmp1, 32 ; <i32> [#uses=1]
- %ov3 = add i32 %ovm, 145 ; <i32> [#uses=1]
- %ov110 = xor i32 %ov3, 153 ; <i32> [#uses=1]
- ret i32 %ov110
-}
-
Modified: llvm/trunk/test/Transforms/InstCombine/xor2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/xor2.ll?rev=83796&r1=83795&r2=83796&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/xor2.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/xor2.ll Sun Oct 11 16:42:08 2009
@@ -1,17 +1,32 @@
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: opt < %s -instcombine -S | not grep {xor }
+; RUN: opt < %s -instcombine -S | FileCheck %s
; PR1253
define i1 @test0(i32 %A) {
+; CHECK: @test0
+; CHECK: %C = icmp slt i32 %A, 0
%B = xor i32 %A, -2147483648
%C = icmp sgt i32 %B, -1
ret i1 %C
}
define i1 @test1(i32 %A) {
+; CHECK: @test1
+; CHECK: %C = icmp slt i32 %A, 0
%B = xor i32 %A, 12345
%C = icmp slt i32 %B, 0
ret i1 %C
}
+; PR1014
+define i32 @test2(i32 %tmp1) {
+; CHECK: @test2
+; CHECK-NEXT: or i32 %tmp1, 8
+; CHECK-NEXT: and i32
+; CHECK-NEXT: ret i32
+ %ovm = and i32 %tmp1, 32
+ %ov3 = add i32 %ovm, 145
+ %ov110 = xor i32 %ov3, 153
+ ret i32 %ov110
+}
More information about the llvm-commits
mailing list