[llvm] [DAGCombiner] Add support for scalarising extracts of a vector setcc (PR #116031)

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 04:19:03 PST 2024


mikaelholmen wrote:

Hi @david-arm ,

I start seeing
```llc: ../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7218: SDValue llvm::SelectionDAG::getNode(unsigned int, const SDLoc &, EVT, SDValue, SDValue, const SDNodeFlags): Assertion `N1.getValueType() == N2.getValueType() && N1.getValueType() == VT && "Binary operator types must match!"' failed.```
with this patch.
e.g. with
```llc -march=x86-64 -o /dev/null e.ll```
with e.ll being
```
define void @autogen_SD6379(<1 x i1> %I111) {
BB:
  br label %CF259

CF259:                                            ; preds = %CF274, %BB
  %Sl178 = select <1 x i1> %I111, <1 x i1> zeroinitializer, <1 x i1> splat (i1 true)
  br label %CF274

CF274:                                            ; preds = %CF259
  %E188 = extractelement <1 x i1> %Sl178, i32 0
  br label %CF259
}
```


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


More information about the llvm-commits mailing list