[llvm] [VectorCombine] foldPermuteOfBinops - fold "shuffle (binop (shuffle, other)), undef" --> "binop (shuffle), (shuffle)". (PR #122118)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 07:38:34 PST 2025


fhahn wrote:

Looks like this is causing another crash:

```
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "arm64-apple-macosx13.0.0"

define <4 x float> @test(<4 x float> %mul.i.2.i.i.i.i606) {
entry:
  %0 = shufflevector <4 x float> %mul.i.2.i.i.i.i606, <4 x float> zeroinitializer, <2 x i32> <i32 1, i32 5>
  %1 = fmul <2 x float> %0, zeroinitializer
  %2 = shufflevector <2 x float> %1, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  ret <4 x float> %2
}
```

-----

```
$ bin/opt -p vector-combine reduced.ll
Assertion failed: (S1->getType() == S2->getType() && "Cannot create binary operator with two operands of differing type!"), function Create, file Instructions.cpp, line 2643.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
```

https://github.com/llvm/llvm-project/pull/122118


More information about the llvm-commits mailing list