[llvm] 95606a5 - [VectorCombine] Add tests for #67060 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 05:18:38 PDT 2023
Author: Nikita Popov
Date: 2023-09-28T14:18:29+02:00
New Revision: 95606a58c15e19fab3a65c5bb3f69cd6365c8555
URL: https://github.com/llvm/llvm-project/commit/95606a58c15e19fab3a65c5bb3f69cd6365c8555
DIFF: https://github.com/llvm/llvm-project/commit/95606a58c15e19fab3a65c5bb3f69cd6365c8555.diff
LOG: [VectorCombine] Add tests for #67060 (NFC)
Added:
Modified:
llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
llvm/test/Transforms/VectorCombine/load-insert-store.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll b/llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
index f11a136a9bc59aa..c68c5c6e7593d9e 100644
--- a/llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
+++ b/llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
@@ -656,6 +656,18 @@ define i31 @load_with_non_power_of_2_element_type(ptr %x) {
ret i31 %r
}
+; FIXME: This is a miscompile.
+define i1 @load_with_non_power_of_2_element_type_2(ptr %x) {
+; CHECK-LABEL: @load_with_non_power_of_2_element_type_2(
+; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds <8 x i1>, ptr [[X:%.*]], i32 0, i32 1
+; CHECK-NEXT: [[R:%.*]] = load i1, ptr [[TMP1]], align 1
+; CHECK-NEXT: ret i1 [[R]]
+;
+ %lv = load <8 x i1>, ptr %x
+ %r = extractelement <8 x i1> %lv, i32 1
+ ret i1 %r
+}
+
; Scalarizing the load for multiple constant indices may not be profitable.
define i32 @load_multiple_extracts_with_constant_idx(ptr %x) {
; CHECK-LABEL: @load_multiple_extracts_with_constant_idx(
diff --git a/llvm/test/Transforms/VectorCombine/load-insert-store.ll b/llvm/test/Transforms/VectorCombine/load-insert-store.ll
index 3b092fedfdfa216..c10e97ce8ef3c10 100644
--- a/llvm/test/Transforms/VectorCombine/load-insert-store.ll
+++ b/llvm/test/Transforms/VectorCombine/load-insert-store.ll
@@ -107,6 +107,19 @@ entry:
ret void
}
+; FIXME: This is a miscompile.
+define void @insert_store_v32i1(ptr %p) {
+; CHECK-LABEL: @insert_store_v32i1(
+; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds <32 x i1>, ptr [[P:%.*]], i64 0, i64 0
+; CHECK-NEXT: store i1 true, ptr [[TMP1]], align 4
+; CHECK-NEXT: ret void
+;
+ %vec = load <32 x i1>, ptr %p
+ %ins = insertelement <32 x i1> %vec, i1 true, i64 0
+ store <32 x i1> %ins, ptr %p
+ ret void
+}
+
define void @insert_store_blk_
diff er(ptr %q, i16 zeroext %s) {
; CHECK-LABEL: @insert_store_blk_
diff er(
; CHECK-NEXT: entry:
More information about the llvm-commits
mailing list