[llvm] 6ace81d - [VectorCombine] add test with out-of-bounds insert/extract index; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 12:00:08 PDT 2022
Author: Sanjay Patel
Date: 2022-10-10T14:59:56-04:00
New Revision: 6ace81db3ad95fac87fd1afea7ef44b373188e83
URL: https://github.com/llvm/llvm-project/commit/6ace81db3ad95fac87fd1afea7ef44b373188e83
DIFF: https://github.com/llvm/llvm-project/commit/6ace81db3ad95fac87fd1afea7ef44b373188e83.diff
LOG: [VectorCombine] add test with out-of-bounds insert/extract index; NFC
D135278
Added:
Modified:
llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll b/llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll
index b4e785e59d3fe..11c82d86d582b 100644
--- a/llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll
+++ b/llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll
@@ -115,3 +115,16 @@ define <2 x double> @ext1_v2f64_ins0(<2 x double> %x, <2 x double> %y) {
%r = insertelement <2 x double> %y, double %n, i32 0
ret <2 x double> %r
}
+
+define <4 x float> @ext12_v4f32(<4 x float> %x, <4 x float> %y) {
+; CHECK-LABEL: @ext12_v4f32(
+; CHECK-NEXT: [[E:%.*]] = extractelement <4 x float> [[X:%.*]], i32 12
+; CHECK-NEXT: [[N:%.*]] = fneg float [[E]]
+; CHECK-NEXT: [[R:%.*]] = insertelement <4 x float> [[Y:%.*]], float [[N]], i32 12
+; CHECK-NEXT: ret <4 x float> [[R]]
+;
+ %e = extractelement <4 x float> %x, i32 12
+ %n = fneg float %e
+ %r = insertelement <4 x float> %y, float %n, i32 12
+ ret <4 x float> %r
+}
More information about the llvm-commits
mailing list