[llvm] [SLP][REVEC] getNumElements should not be used as VF when REVEC is enabled. (PR #134031)
Han-Kuan Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 2 04:01:43 PDT 2025
================
@@ -0,0 +1,37 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 -passes=slp-vectorizer -S -slp-revec < %s | FileCheck %s
+
+define i32 @test1(<4 x float> %0, <4 x float> %1) {
+entry:
+ %2 = getelementptr i8, ptr null, i64 288
+ %3 = getelementptr i8, ptr null, i64 304
+ %4 = getelementptr i8, ptr null, i64 416
+ %5 = getelementptr i8, ptr null, i64 432
+ %6 = getelementptr i8, ptr null, i64 256
+ %7 = getelementptr i8, ptr null, i64 272
+ %8 = getelementptr i8, ptr null, i64 288
+ %9 = getelementptr i8, ptr null, i64 304
+ %10 = load <4 x float>, ptr %2, align 16
+ %11 = load <4 x float>, ptr %3, align 16
+ %12 = load <4 x float>, ptr %4, align 16
+ %13 = load <4 x float>, ptr %5, align 16
+ %14 = fmul <4 x float> %10, %0
+ %15 = fmul <4 x float> %11, %0
+ %16 = fmul <4 x float> %12, %0
+ %17 = fmul <4 x float> %13, %0
+ %18 = fsub <4 x float> %14, %1
+ %19 = fsub <4 x float> %15, zeroinitializer
+ %20 = fsub <4 x float> %16, %1
+ %21 = fsub <4 x float> %17, zeroinitializer
+ %22 = fmul <4 x float> %11, zeroinitializer
+ %23 = fmul <4 x float> %13, zeroinitializer
+ %24 = fadd <4 x float> %18, %0
+ %25 = fadd <4 x float> %19, zeroinitializer
+ %26 = fadd <4 x float> %20, %0
+ %27 = fadd <4 x float> %21, zeroinitializer
+ store <4 x float> %24, ptr %6, align 16
+ store <4 x float> %25, ptr %7, align 16
+ store <4 x float> %26, ptr %8, align 16
+ store <4 x float> %27, ptr %9, align 16
+ ret i32 0
----------------
HanKuanChen wrote:
> Checking: Did you intend to pre-commit the test without CHECK lines?
opt would crash. That is why it does not have CHECK lines.
https://github.com/llvm/llvm-project/pull/134031
More information about the llvm-commits
mailing list