[llvm] 5fc7bbf - [SLP][X86] Add test coverage for Issue #58054
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 05:26:42 PDT 2022
Author: Simon Pilgrim
Date: 2022-09-30T13:26:31+01:00
New Revision: 5fc7bbfaa3b0365cf656485d3595d6f94e23164a
URL: https://github.com/llvm/llvm-project/commit/5fc7bbfaa3b0365cf656485d3595d6f94e23164a
DIFF: https://github.com/llvm/llvm-project/commit/5fc7bbfaa3b0365cf656485d3595d6f94e23164a.diff
LOG: [SLP][X86] Add test coverage for Issue #58054
Added:
Modified:
llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll b/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
index 69bb31963a6f..a3484fff8577 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
@@ -39,7 +39,29 @@ entry:
%call = call i16 @check_i16(i16 noundef 1, i16 noundef %reass.mul24, i16 noundef 5120)
unreachable
}
-
declare i16 @check_i16(i16, i16, i16)
+define void @PR58054() {
+; CHECK-LABEL: @PR58054(
+; CHECK-NEXT: [[VAL:%.*]] = add i64 poison, poison
+; CHECK-NEXT: [[VAL2:%.*]] = add i64 poison, poison
+; CHECK-NEXT: [[VAL3:%.*]] = mul i64 [[VAL2]], [[VAL]]
+; CHECK-NEXT: [[VAL4:%.*]] = mul i64 [[VAL3]], [[VAL2]]
+; CHECK-NEXT: [[VAL5:%.*]] = mul i64 [[VAL4]], [[VAL2]]
+; 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
+;
+ %val = add i64 poison, poison
+ %val2 = add i64 poison, poison
+ %val3 = mul i64 %val2, %val
+ %val4 = mul i64 %val3, %val2
+ %val5 = mul i64 %val4, %val2
+ %val7 = add i64 %val, %val5
+ %val8 = sitofp i64 %val7 to double
+ call void @wibble(i32 poison, double %val8, i64 poison)
+ unreachable
+}
+declare void @wibble(i32, double, i64)
More information about the llvm-commits
mailing list