Add a new test16 and fix some other tests that were not properly written
authorChris Lattner <sabre@nondot.org>
Tue, 25 May 2004 04:28:43 +0000 (04:28 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 May 2004 04:28:43 +0000 (04:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13735 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/cast.ll

index 8b835c3372c6df7e58e81bb5b8f678b8aff4fb6e..a460661506de3f08411bd15ad31138dc2dd7f910 100644 (file)
@@ -88,14 +88,18 @@ ubyte *%test13(long %A) {
 }
 
 bool %test14(sbyte %A) {
-        %B = cast sbyte %A to ubyte
-        %X = setlt ubyte %B, 128   ; setge %A, 0
+        %c = cast sbyte %A to ubyte
+        %X = setlt ubyte %c, 128   ; setge %A, 0
         ret bool %X
 }
 
 bool %test15(ubyte %A) {
-        %B = cast ubyte %A to sbyte
-        %X = setlt sbyte %B, 0   ; setgt %A, 127
+        %c = cast ubyte %A to sbyte
+        %X = setlt sbyte %c, 0   ; setgt %A, 127
         ret bool %X
 }
 
+bool %test16(int* %P) {
+       %c = cast int* %P to bool  ;; setne P, null
+       ret bool %c
+}