[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/and.ll cast.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 22 16:45:01 PDT 2003


Changes in directory llvm/test/Regression/Transforms/InstCombine:

and.ll updated: 1.9 -> 1.10
cast.ll updated: 1.11 -> 1.12

---
Log message:

New testcases


---
Diffs of the changes:

Index: llvm/test/Regression/Transforms/InstCombine/and.ll
diff -u llvm/test/Regression/Transforms/InstCombine/and.ll:1.9 llvm/test/Regression/Transforms/InstCombine/and.ll:1.10
--- llvm/test/Regression/Transforms/InstCombine/and.ll:1.9	Sat Jun 28 18:31:56 2003
+++ llvm/test/Regression/Transforms/InstCombine/and.ll	Tue Jul 22 16:44:06 2003
@@ -47,3 +47,14 @@
 	ret ubyte %C
 }
 
+bool %test9(int %A) {
+	%B = and int %A, -2147483648   ; Test of sign bit, convert to setle %A, 0 
+	%C = cast int %B to bool
+	ret bool %C
+}
+
+bool %test9(uint %A) {
+	%B = and uint %A, 2147483648   ; Test of sign bit, convert to setle %A, 0 
+	%C = cast uint %B to bool
+	ret bool %C
+}


Index: llvm/test/Regression/Transforms/InstCombine/cast.ll
diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.11 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.12
--- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.11	Sat Jun 28 18:31:56 2003
+++ llvm/test/Regression/Transforms/InstCombine/cast.ll	Tue Jul 22 16:44:06 2003
@@ -68,19 +68,24 @@
 
 bool %test11(ubyte %A, ubyte %B) {
         %C = sub ubyte %A, %B
-        %D = cast ubyte %C to bool    ; == setne A, B
-        ret bool %D
+        %cD = cast ubyte %C to bool    ; == setne A, B
+        ret bool %cD
 }
 
 bool %test12(ubyte %A) {
         %B = add ubyte %A, 255
-        %C = cast ubyte %B to bool    ; === A != 1
-        ret bool %C
+        %c = cast ubyte %B to bool    ; === A != 1
+        ret bool %c
 }
 
 bool %test13(ubyte %A, ubyte %b) {
         %B = add ubyte %A, %b
-        %C = cast ubyte %B to bool    ; === A != -b
-        ret bool %C
+        %c = cast ubyte %B to bool    ; === A != -b
+        ret bool %c
 }
 
+bool %test14(ubyte %A) {
+	%B = xor ubyte %A, 4
+	%c = cast ubyte %B to bool
+	ret bool %c
+}





More information about the llvm-commits mailing list