Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit a90cde9

Browse files
committed
[InstCombine] add test for missing vector optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271808 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b06c2a4 commit a90cde9

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

test/Transforms/InstCombine/cast.ll

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,24 @@ define i1 @test19(i32 %X) {
209209
; CHECK-NEXT: [[Z:%.*]] = icmp slt i32 %X, 12345
210210
; CHECK-NEXT: ret i1 [[Z]]
211211
;
212-
%c = sext i32 %X to i64 ; <i64> [#uses=1]
213-
%Z = icmp slt i64 %c, 12345 ; <i1> [#uses=1]
212+
%c = sext i32 %X to i64
213+
%Z = icmp slt i64 %c, 12345
214214
ret i1 %Z
215215
}
216216

217+
; FIXME: Vector should be the same as scalar.
218+
219+
define <2 x i1> @test19vec(<2 x i32> %X) {
220+
; CHECK-LABEL: @test19vec(
221+
; CHECK-NEXT: [[C:%.*]] = sext <2 x i32> %X to <2 x i64>
222+
; CHECK-NEXT: [[Z:%.*]] = icmp slt <2 x i64> [[C]], <i64 12345, i64 2147483647>
223+
; CHECK-NEXT: ret <2 x i1> [[Z]]
224+
;
225+
%c = sext <2 x i32> %X to <2 x i64>
226+
%Z = icmp slt <2 x i64> %c, <i64 12345, i64 2147483647>
227+
ret <2 x i1> %Z
228+
}
229+
217230
define i1 @test20(i1 %B) {
218231
; CHECK-LABEL: @test20(
219232
; CHECK-NEXT: ret i1 false

0 commit comments

Comments
 (0)