New testcase crashing the instruction combiner
[oota-llvm.git] / test / Transforms / InstCombine / sub.ll
index 4bd9be645b5ec7edd7ca18539a330707dceca405..4f2a1c9ce03545ba6712923f8200a37348ec7813 100644 (file)
@@ -1,7 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: as < %s | opt -instcombine -die | dis | grep sub | grep-not -v 'sub int %Cok, %Bok'
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep sub | not grep -v 'sub int %Cok, %Bok'
 
 implementation
 
@@ -69,3 +69,8 @@ int %test10(int %A) {    ; -A *c1 == A * -c1
        ret int %E
 }
 
+bool %test11(ubyte %A, ubyte %B) {
+        %C = sub ubyte %A, %B
+        %cD = setne ubyte %C, 0    ; == setne A, B
+        ret bool %cD
+}