Skip to content

Commit ab902ee

Browse files
committed
[SLP][NFC]Replace more unreachable terminators by rets, NFC
1 parent aa2c0f3 commit ab902ee

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

llvm/test/Transforms/SLPVectorizer/SystemZ/pr34619.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@bar = external global [4 x [4 x i32]], align 4
55
@dct_luma = external global [4 x [4 x i32]], align 4
66

7-
define void @foo() local_unnamed_addr {
7+
define void @foo() {
88
; CHECK-LABEL: @foo(
99
; CHECK-NEXT: entry:
1010
; CHECK-NEXT: [[ADD277:%.*]] = add nsw i32 undef, undef
@@ -18,7 +18,7 @@ define void @foo() local_unnamed_addr {
1818
; CHECK-NEXT: [[TMP5:%.*]] = add nsw <4 x i32> [[TMP3]], [[TMP4]]
1919
; CHECK-NEXT: [[TMP6:%.*]] = ashr <4 x i32> [[TMP5]], <i32 6, i32 6, i32 6, i32 6>
2020
; CHECK-NEXT: store <4 x i32> [[TMP6]], ptr [[ARRAYIDX372]], align 4
21-
; CHECK-NEXT: unreachable
21+
; CHECK-NEXT: ret void
2222
;
2323
entry:
2424
%add277 = add nsw i32 undef, undef
@@ -42,5 +42,5 @@ entry:
4242
%shr.i.3 = ashr i32 %sub355.3, 6
4343
%arrayidx372.3 = getelementptr inbounds [4 x [4 x i32]], ptr @dct_luma, i64 0, i64 3, i64 3
4444
store i32 %shr.i.3, ptr %arrayidx372.3, align 4
45-
unreachable
45+
ret void
4646
}

llvm/test/Transforms/SLPVectorizer/X86/crash_smallpt.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ define void @main() {
3232
; CHECK-NEXT: store <2 x double> [[TMP3]], ptr undef, align 8
3333
; CHECK-NEXT: [[TMP4:%.*]] = fmul <2 x double> <double 2.000000e-01, double 3.000000e-01>, [[TMP1]]
3434
; CHECK-NEXT: store <2 x double> [[TMP4]], ptr [[AGG_TMP101211_SROA_0_0_IDX]], align 8
35-
; CHECK-NEXT: unreachable
35+
; CHECK-NEXT: ret void
3636
; CHECK: cond.true63.us:
3737
; CHECK-NEXT: unreachable
3838
; CHECK: for.body42.lr.ph.us:
@@ -81,7 +81,7 @@ cond.false66.us:
8181
store double %add4.i246.us, ptr %agg.tmp99208.sroa.1.8.idx388, align 8
8282
store double %mul.i.i.us, ptr %agg.tmp101211.sroa.0.0.idx, align 8
8383
store double %mul2.i.i.us, ptr %agg.tmp101211.sroa.1.8.idx390, align 8
84-
unreachable
84+
ret void
8585

8686
cond.true63.us:
8787
unreachable

llvm/test/Transforms/SLPVectorizer/X86/extractelement-single-use-many-nodes.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ define void @foo(double %i) {
4141
; CHECK-NEXT: [[OP_RDX1:%.*]] = select i1 [[OP_RDX]], i32 [[TMP31]], i32 32000
4242
; CHECK-NEXT: [[I163:%.*]] = fcmp ogt double [[I118]], 0.000000e+00
4343
; CHECK-NEXT: [[I164:%.*]] = icmp slt i32 0, [[OP_RDX1]]
44-
; CHECK-NEXT: unreachable
44+
; CHECK-NEXT: ret void
4545
; CHECK: bb58:
4646
; CHECK-NEXT: ret void
4747
;
@@ -134,7 +134,7 @@ bb115:
134134
%i159 = select i1 %i158, i32 %i157, i32 %i152
135135
%i163 = fcmp ogt double %i118, 0.000000e+00
136136
%i164 = icmp slt i32 0, %i159
137-
unreachable
137+
ret void
138138

139139
bb58:
140140
ret void

llvm/test/Transforms/SLPVectorizer/X86/resched.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ define fastcc void @_ZN12_GLOBAL__N_127PolynomialMultiplyRecognize9recognizeEv()
3131
; CHECK-NEXT: [[TMP16:%.*]] = call <16 x i8> @llvm.vector.insert.v16i8.v2i8(<16 x i8> [[TMP14]], <2 x i8> [[TMP15]], i64 2)
3232
; CHECK-NEXT: [[TMP17:%.*]] = and <16 x i8> [[TMP16]], <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
3333
; CHECK-NEXT: store <16 x i8> [[TMP17]], ptr undef, align 1
34-
; CHECK-NEXT: unreachable
34+
; CHECK-NEXT: ret void
3535
; CHECK: if.end50.i:
3636
; CHECK-NEXT: ret void
3737
;
@@ -119,7 +119,7 @@ if.then22.i: ; preds = %entry
119119
%conv.15.i.i = and i8 %15, 1
120120
%arrayidx.i.i7.15.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 15
121121
store i8 %conv.15.i.i, ptr %arrayidx.i.i7.15.i.i, align 1
122-
unreachable
122+
ret void
123123

124124
if.end50.i: ; preds = %entry
125125
ret void

0 commit comments

Comments
 (0)