[llvm] 91a0fec - [SLP][NFC]Replace unreachable instructions by rets, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 07:01:08 PDT 2024
Author: Alexey Bataev
Date: 2024-10-14T07:00:56-07:00
New Revision: 91a0fecf194b09fb8a0d8bdfb92c50b2addd29de
URL: https://github.com/llvm/llvm-project/commit/91a0fecf194b09fb8a0d8bdfb92c50b2addd29de
DIFF: https://github.com/llvm/llvm-project/commit/91a0fecf194b09fb8a0d8bdfb92c50b2addd29de.diff
LOG: [SLP][NFC]Replace unreachable instructions by rets, NFC.
Added:
Modified:
llvm/test/Transforms/SLPVectorizer/X86/insertelements-with-reused-indices.ll
llvm/test/Transforms/SLPVectorizer/X86/partail.ll
llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll
llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/insertelements-with-reused-indices.ll b/llvm/test/Transforms/SLPVectorizer/X86/insertelements-with-reused-indices.ll
index e46c3b94383ffc..a8160d77619c53 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/insertelements-with-reused-indices.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/insertelements-with-reused-indices.ll
@@ -10,7 +10,7 @@ define void @test() {
; CHECK-NEXT: [[TMP3:%.*]] = insertelement <4 x float> [[TMP2]], float 0.000000e+00, i32 0
; CHECK-NEXT: [[TMP4:%.*]] = fsub float 0.000000e+00, 0.000000e+00
; CHECK-NEXT: [[TMP5:%.*]] = insertelement <2 x float> zeroinitializer, float [[TMP4]], i32 0
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: ret void
;
entry:
%0 = fsub float 0.000000e+00, 0.000000e+00
@@ -23,5 +23,5 @@ entry:
%7 = fsub float 0.000000e+00, %0
%8 = fsub float %7, %4
%9 = insertelement <2 x float> zeroinitializer, float %8, i32 0
- unreachable
+ ret void
}
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/partail.ll b/llvm/test/Transforms/SLPVectorizer/X86/partail.ll
index 0b9ed47ce0f178..20ad09a6328268 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/partail.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/partail.ll
@@ -37,7 +37,7 @@ define void @get_block(i32 %y_pos) local_unnamed_addr #0 {
; CHECK-NEXT: [[COND_I5_I_3:%.*]] = select i1 [[CMP_I4_I_3]], i32 [[COND_I_I_3]], i32 undef
; CHECK-NEXT: [[IDXPROM30_3:%.*]] = sext i32 [[COND_I5_I_3]] to i64
; CHECK-NEXT: [[ARRAYIDX31_3:%.*]] = getelementptr inbounds ptr, ptr undef, i64 [[IDXPROM30_3]]
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: ret void
;
entry:
br label %land.lhs.true
@@ -75,5 +75,5 @@ if.end: ; preds = %land.lhs.true
%cond.i5.i.3 = select i1 %cmp.i4.i.3, i32 %cond.i.i.3, i32 undef
%idxprom30.3 = sext i32 %cond.i5.i.3 to i64
%arrayidx31.3 = getelementptr inbounds ptr, ptr undef, i64 %idxprom30.3
- unreachable
+ ret void
}
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll b/llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll
index d9496a3e3e343a..1c4de256468c7e 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu -mcpu=bdver2 < %s | FileCheck %s
-define dso_local void @rftbsub(ptr %a) local_unnamed_addr #0 {
+define void @rftbsub(ptr %a) {
; CHECK-LABEL: @rftbsub(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds double, ptr [[A:%.*]], i64 2
@@ -17,7 +17,7 @@ define dso_local void @rftbsub(ptr %a) local_unnamed_addr #0 {
; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x double> [[TMP3]], double [[SUB22]], i32 1
; CHECK-NEXT: [[TMP5:%.*]] = fsub <2 x double> [[TMP2]], [[TMP4]]
; CHECK-NEXT: store <2 x double> [[TMP5]], ptr [[ARRAYIDX6]], align 8
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: ret void
;
entry:
%arrayidx6 = getelementptr inbounds double, ptr %a, i64 2
@@ -33,5 +33,5 @@ entry:
store double %sub25, ptr %arrayidx6, align 8
%sub29 = fsub double %2, %sub22
store double %sub29, ptr %arrayidx12, align 8
- unreachable
+ ret void
}
diff --git a/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll b/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
index 9f6b285f1ab90a..91c0c7ab42e779 100644
--- a/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
+++ b/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
@@ -4,7 +4,7 @@
; Crash Test case reported on D134605
-define i16 @D134605() {
+define void @D134605() {
; CHECK-LABEL: @D134605(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[ARRAYIDX81:%.*]] = getelementptr inbounds [32 x i16], ptr poison, i16 0, i16 3
@@ -16,7 +16,7 @@ define i16 @D134605() {
; CHECK-NEXT: [[OP_RDX:%.*]] = add i16 [[TMP3]], poison
; CHECK-NEXT: [[REASS_MUL24:%.*]] = shl i16 [[OP_RDX]], 2
; CHECK-NEXT: [[CALL:%.*]] = call i16 @check_i16(i16 noundef 1, i16 noundef [[REASS_MUL24]], i16 noundef 5120)
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: ret void
;
entry:
%arrayidx81 = getelementptr inbounds [32 x i16], ptr poison, i16 0, i16 3
@@ -38,7 +38,7 @@ entry:
%add15935 = add i16 %add15534, poison
%reass.mul24 = shl i16 %add15935, 2
%call = call i16 @check_i16(i16 noundef 1, i16 noundef %reass.mul24, i16 noundef 5120)
- unreachable
+ ret void
}
declare i16 @check_i16(i16, i16, i16)
@@ -53,7 +53,7 @@ define void @PR58054() {
; CHECK-NEXT: [[VAL7:%.*]] = add i64 [[VAL]], [[VAL5]]
; CHECK-NEXT: [[VAL8:%.*]] = sitofp i64 [[VAL7]] to double
; CHECK-NEXT: call void @wibble(i32 poison, double [[VAL8]], i64 poison)
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: ret void
;
%val = add i64 poison, poison
%val2 = add i64 poison, poison
@@ -63,6 +63,6 @@ define void @PR58054() {
%val7 = add i64 %val, %val5
%val8 = sitofp i64 %val7 to double
call void @wibble(i32 poison, double %val8, i64 poison)
- unreachable
+ ret void
}
declare void @wibble(i32, double, i64)
More information about the llvm-commits
mailing list