[llvm] r271808 - [InstCombine] add test for missing vector optimization
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 14:41:25 PDT 2016
Author: spatel
Date: Sat Jun 4 16:41:25 2016
New Revision: 271808
URL: http://llvm.org/viewvc/llvm-project?rev=271808&view=rev
Log:
[InstCombine] add test for missing vector optimization
Modified:
llvm/trunk/test/Transforms/InstCombine/cast.ll
Modified: llvm/trunk/test/Transforms/InstCombine/cast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/cast.ll?rev=271808&r1=271807&r2=271808&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/cast.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/cast.ll Sat Jun 4 16:41:25 2016
@@ -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
More information about the llvm-commits
mailing list