make this harder
authorChris Lattner <sabre@nondot.org>
Tue, 19 Sep 2006 06:17:55 +0000 (06:17 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Sep 2006 06:17:55 +0000 (06:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30481 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/select.ll

index a738f7442352d7afbe73c619d59573383794a43b..2188dc9a6f137b2d51875d10dd3dafbd7a7a23c1 100644 (file)
@@ -1,6 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select &&
+; RUN: llvm-as < %s | opt -instcombine -disable-output
 
 implementation
 
@@ -155,7 +156,6 @@ int %test18(int %X, int %Y, bool %C) {
 }
 
 int %test19(uint %x) {
-entry:
         %tmp = setgt uint %x, 2147483647
         %retval = select bool %tmp, int -1, int 0
         ret int %retval
@@ -167,3 +167,15 @@ int %test20(int %x) {
         ret int %retval
 }
 
+long %test21(int %x) {
+        %tmp = setlt int %x, 0
+        %retval = select bool %tmp, long -1, long 0
+        ret long %retval
+}
+
+short %test20(int %x) {
+        %tmp = setlt int %x, 0
+        %retval = select bool %tmp, short -1, short 0
+        ret short %retval
+}
+