summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/select.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/select.ll')
-rw-r--r--test/Transforms/InstCombine/select.ll16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll
index a738f74423..2188dc9a6f 100644
--- a/test/Transforms/InstCombine/select.ll
+++ b/test/Transforms/InstCombine/select.ll
@@ -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
+}
+