Skip to content

Commit ff48e83

Browse files
committed
[SLP][NFC]Add a test for reused extracts corner case, NFC.
1 parent 39d5532 commit ff48e83

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
2+
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-pc-windows-msvc19.34.0 < %s | FileCheck %s
3+
4+
define void @test() {
5+
; CHECK-LABEL: define void @test() {
6+
; CHECK-NEXT: entry:
7+
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i1> poison, i1 false, i32 0
8+
; CHECK-NEXT: [[TMP1:%.*]] = load <2 x i64>, ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 9), align 8
9+
; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x i1> [[TMP0]], i1 false, i32 1
10+
; CHECK-NEXT: [[TMP3:%.*]] = zext <2 x i1> [[TMP2]] to <2 x i64>
11+
; CHECK-NEXT: [[TMP4:%.*]] = or <2 x i64> [[TMP1]], [[TMP3]]
12+
; CHECK-NEXT: store <2 x i64> [[TMP4]], ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 9), align 8
13+
; CHECK-NEXT: ret void
14+
;
15+
entry:
16+
%cmp.i.i = fcmp olt float 0.000000e+00, 0.000000e+00
17+
%0 = zext i1 %cmp.i.i to i64
18+
%pgocount88 = load i64, ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 9), align 8
19+
%1 = or i64 %pgocount88, %0
20+
store i64 %1, ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 9), align 8
21+
%cond.i.i = select i1 %cmp.i.i, float 0.000000e+00, float 0.000000e+00
22+
%cmp1.i.i = fcmp ogt float %cond.i.i, 0.000000e+00
23+
%2 = zext i1 %cmp1.i.i to i64
24+
%pgocount89 = load i64, ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 10), align 8
25+
%3 = or i64 %pgocount89, %2
26+
store i64 %3, ptr getelementptr inbounds ([17 x i64], ptr null, i64 0, i64 10), align 8
27+
%cmp.i9.i = fcmp olt float 0.000000e+00, 0.000000e+00
28+
%cond.i10.i = select i1 %cmp.i9.i, float 0.000000e+00, float 0.000000e+00
29+
%cmp1.i11.i = fcmp ogt float %cond.i10.i, 0.000000e+00
30+
%cmp.i14.i = fcmp olt float 0.000000e+00, 0.000000e+00
31+
%cond.i15.i = select i1 %cmp.i14.i, float 0.000000e+00, float 0.000000e+00
32+
%cmp1.i16.i = fcmp ogt float %cond.i15.i, 0.000000e+00
33+
%cmp.i19.i = fcmp olt float 0.000000e+00, 0.000000e+00
34+
%cond.i20.i = select i1 %cmp.i19.i, float 0.000000e+00, float 0.000000e+00
35+
%cmp1.i21.i = fcmp ogt float %cond.i20.i, 0.000000e+00
36+
ret void
37+
}

0 commit comments

Comments
 (0)