[llvm] [VPlan] First step towards VPlan cost modeling. (PR #92555)
Alexander Kornienko via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 10:34:11 PDT 2024
alexfh wrote:
I couldn't get a reduced test case for `Invalid shufflevector operands!`, but there's one for `Both operands to a binary operator are not of the same type!`:
```
$ cat reduced.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @_f(ptr %0, ptr %1) #0 {
.preheader.preheader:
br label %.preheader
.loopexit.loopexit: ; preds = %.preheader
ret void
.preheader: ; preds = %.preheader, %.preheader.preheader
%2 = phi i64 [ %23, %.preheader ], [ 0, %.preheader.preheader ]
%3 = shl i64 %2, 5
%4 = getelementptr i8, ptr %0, i64 %3
%5 = or disjoint i64 %3, 16
%6 = getelementptr i8, ptr %0, i64 %5
%7 = load float, ptr %4, align 4
%8 = load float, ptr %6, align 4
%9 = fadd float %7, 0.000000e+00
%10 = fmul float 0.000000e+00, 0.000000e+00
store float %9, ptr null, align 4
%11 = getelementptr i8, ptr %4, i64 4
%12 = load float, ptr %11, align 4
%13 = getelementptr i8, ptr %6, i64 4
%14 = load float, ptr %13, align 4
store float 0.000000e+00, ptr %1, align 4
%15 = getelementptr i8, ptr %4, i64 8
%16 = load float, ptr %15, align 4
%17 = getelementptr i8, ptr %6, i64 8
%18 = load float, ptr %17, align 4
%19 = getelementptr i8, ptr %4, i64 12
%20 = load float, ptr %19, align 4
%21 = getelementptr i8, ptr %6, i64 12
%22 = load float, ptr %21, align 4
%23 = add i64 %2, 1
%24 = icmp eq i64 %23, 0
br i1 %24, label %.loopexit.loopexit, label %.preheader
}
attributes #0 = { "target-features"="+aes,+cmov,+crc32,+cx16,+cx8,+fxsr,+mmx,+pclmul,+popcnt,+prfchw,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87" }
$ ./opt-bad -passes=loop-vectorize -S < reduced.ll
Both operands to a binary operator are not of the same type!
%6 = fadd <4 x float> %strided.vec, <2 x float> zeroinitializer
LLVM ERROR: Broken module found, compilation aborted!
```
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list