summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-06-04 21:41:25 +0000
committerSanjay Patel <spatel@rotateright.com>2016-06-04 21:41:25 +0000
commit8e63999bee03786a63ec40985a55a6e3f48315c4 (patch)
treefef9bfb7ff4e5d098c0685778357980748ef7445 /llvm
parentc774f8c265b7880d3a0a251b1c7ccfd78d98aedd (diff)
downloadbcm5719-llvm-8e63999bee03786a63ec40985a55a6e3f48315c4.tar.gz
bcm5719-llvm-8e63999bee03786a63ec40985a55a6e3f48315c4.zip
[InstCombine] add test for missing vector optimization
llvm-svn: 271808
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Transforms/InstCombine/cast.ll17
1 files changed, 15 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll
index de09a7bcf46..91b1348f784 100644
--- a/llvm/test/Transforms/InstCombine/cast.ll
+++ b/llvm/test/Transforms/InstCombine/cast.ll
@@ -209,11 +209,24 @@ define i1 @test19(i32 %X) {
; CHECK-NEXT: [[Z:%.*]] = icmp slt i32 %X, 12345
; CHECK-NEXT: ret i1 [[Z]]
;
- %c = sext i32 %X to i64 ; <i64> [#uses=1]
- %Z = icmp slt i64 %c, 12345 ; <i1> [#uses=1]
+ %c = sext i32 %X to i64
+ %Z = icmp slt i64 %c, 12345
ret i1 %Z
}
+; FIXME: Vector should be the same as scalar.
+
+define <2 x i1> @test19vec(<2 x i32> %X) {
+; CHECK-LABEL: @test19vec(
+; CHECK-NEXT: [[C:%.*]] = sext <2 x i32> %X to <2 x i64>
+; CHECK-NEXT: [[Z:%.*]] = icmp slt <2 x i64> [[C]], <i64 12345, i64 2147483647>
+; CHECK-NEXT: ret <2 x i1> [[Z]]
+;
+ %c = sext <2 x i32> %X to <2 x i64>
+ %Z = icmp slt <2 x i64> %c, <i64 12345, i64 2147483647>
+ ret <2 x i1> %Z
+}
+
define i1 @test20(i1 %B) {
; CHECK-LABEL: @test20(
; CHECK-NEXT: ret i1 false
OpenPOWER on IntegriCloud