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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 04:53:18 PST 2024


david-arm 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
> }
> ```

OK I'll take a look now. If I can't provide an immediate fix I'll revert the patch.

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


More information about the llvm-commits mailing list