[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast.ll
Chris Lattner
lattner at cs.uiuc.edu
Mon Jun 23 16:49:01 PDT 2003
Changes in directory llvm/test/Regression/Transforms/InstCombine:
cast.ll updated: 1.6 -> 1.7
---
Log message:
Test cases for when casts to bool can be eliminated
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/InstCombine/cast.ll
diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.6 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.7
--- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.6 Mon Sep 23 18:39:17 2002
+++ llvm/test/Regression/Transforms/InstCombine/cast.ll Mon Jun 23 16:48:26 2003
@@ -68,3 +68,16 @@
%c2 = cast uint %c1 to short
ret short %c2
}
+
+bool %test11(ubyte %A, ubyte %B) {
+ %C = sub ubyte %A, %B
+ %D = cast ubyte %C to bool ; == setne A, B
+ ret bool %D
+}
+
+bool %test12(ubyte %A) {
+ %B = add ubyte %A, 255
+ %C = cast ubyte %B to bool ; === A != 1
+ ret bool %C
+}
+
More information about the llvm-commits
mailing list