[llvm] 0b98a59 - [VectorCombine] add tests for vector loads; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 13:23:44 PDT 2020
Author: Sanjay Patel
Date: 2020-08-18T16:23:33-04:00
New Revision: 0b98a59fedb5e98661ca531d5ed20110bfdd7b2f
URL: https://github.com/llvm/llvm-project/commit/0b98a59fedb5e98661ca531d5ed20110bfdd7b2f
DIFF: https://github.com/llvm/llvm-project/commit/0b98a59fedb5e98661ca531d5ed20110bfdd7b2f.diff
LOG: [VectorCombine] add tests for vector loads; NFC
Added:
Modified:
llvm/test/Transforms/VectorCombine/X86/load.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/VectorCombine/X86/load.ll b/llvm/test/Transforms/VectorCombine/X86/load.ll
index 524f48332b7c..104c8c2d025f 100644
--- a/llvm/test/Transforms/VectorCombine/X86/load.ll
+++ b/llvm/test/Transforms/VectorCombine/X86/load.ll
@@ -373,3 +373,29 @@ define <8 x i32> @casted_load_i32_insert_v8i32(<4 x i32>* align 4 dereferenceabl
%r = insertelement <8 x i32> undef, i32 %s, i32 0
ret <8 x i32> %r
}
+
+; TODO: Should load v4f32.
+
+define <8 x float> @load_f32_insert_v8f32(float* align 16 dereferenceable(16) %p) {
+; CHECK-LABEL: @load_f32_insert_v8f32(
+; CHECK-NEXT: [[S:%.*]] = load float, float* [[P:%.*]], align 4
+; CHECK-NEXT: [[R:%.*]] = insertelement <8 x float> undef, float [[S]], i32 0
+; CHECK-NEXT: ret <8 x float> [[R]]
+;
+ %s = load float, float* %p, align 4
+ %r = insertelement <8 x float> undef, float %s, i32 0
+ ret <8 x float> %r
+}
+
+; TODO: Should load v4f32.
+
+define <2 x float> @load_f32_insert_v2f32(float* align 16 dereferenceable(16) %p) {
+; CHECK-LABEL: @load_f32_insert_v2f32(
+; CHECK-NEXT: [[S:%.*]] = load float, float* [[P:%.*]], align 4
+; CHECK-NEXT: [[R:%.*]] = insertelement <2 x float> undef, float [[S]], i32 0
+; CHECK-NEXT: ret <2 x float> [[R]]
+;
+ %s = load float, float* %p, align 4
+ %r = insertelement <2 x float> undef, float %s, i32 0
+ ret <2 x float> %r
+}
More information about the llvm-commits
mailing list