; 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
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
}