[llvm] [VectorCombine] Align shrinkLoadForShuffles to register boundaries (PR #209775)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 07:34:19 PDT 2026
================
@@ -252,6 +252,25 @@ define <2 x i4> @vec_with_2elts_128bits_i4(ptr align 16 dereferenceable(16) %p)
ret <2 x i4> %r
}
+; Shrinking this to <9 x double> would change the legalized type.
+
+define <8 x double> @load_v16f64(ptr %p) {
+; SSE-LABEL: @load_v16f64(
+; SSE-NEXT: [[TMP1:%.*]] = load <10 x double>, ptr [[P:%.*]], align 512
+; SSE-NEXT: [[S:%.*]] = shufflevector <10 x double> [[TMP1]], <10 x double> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
+; SSE-NEXT: ret <8 x double> [[S]]
+;
+; AVX-LABEL: @load_v16f64(
+; AVX-NEXT: [[TMP1:%.*]] = load <12 x double>, ptr [[P:%.*]], align 512
+; AVX-NEXT: [[S:%.*]] = shufflevector <12 x double> [[TMP1]], <12 x double> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
+; AVX-NEXT: ret <8 x double> [[S]]
+;
+ %l = load <16 x double>, ptr %p, align 512
+ %s = shufflevector <16 x double> %l, <16 x double> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
+ ret <8 x double> %s
+}
+
----------------
arsenm wrote:
Test a pointer case
https://github.com/llvm/llvm-project/pull/209775
More information about the llvm-commits
mailing list