new testcase
[oota-llvm.git] / test / Transforms / InstCombine / cast.ll
index 3b5b14be99832dc4ff4d7daf463ddf028cc21573..8ee4cc7433f05a6dbf7dc8b65ba7e7ea9dcfa0d5 100644 (file)
@@ -1,6 +1,6 @@
 ; Tests to make sure elimination of casts is working correctly
 
-; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | not grep cast
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep '%c' | not grep cast
 
 implementation
 
@@ -66,26 +66,10 @@ short %test10(short %A) {
        ret short %c2
 }
 
-bool %test11(ubyte %A, ubyte %B) {
-        %C = sub ubyte %A, %B
-        %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
-}
-
-bool %test13(ubyte %A, ubyte %b) {
-        %B = add ubyte %A, %b
-        %c = cast ubyte %B to bool    ; === A != -b
-        ret bool %c
-}
+declare void %varargs(int, ...)
 
-bool %test14(ubyte %A) {
-       %B = xor ubyte %A, 4
-       %c = cast ubyte %B to bool
-       ret bool %c
+void %test11(int* %P) {
+       %c = cast int* %P to short*
+       call void(int, ...)* %varargs(int 5, short* %c)
+       ret void
 }