[llvm] [DAG] Combine `store + vselect` to `masked_store` (PR #145176)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 21:59:36 PDT 2025
topperc wrote:
> > This seems to be breaking one of our internal software. Backend crashes with:
> > ```
> > ScalarizeVectorOperand Op #4: t94: ch = masked_store<(store (s64) into %ir.add.ptr, !alias.scope !2182)> t12, t98, t11, undef:i64, t96
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Relevant lines of backtrace:
> > ```
> > #8 llvm::DAGTypeLegalizer::run()
> > #9 0x000055c40ae936b2 llvm::SelectionDAG::LegalizeTypes()
> > #10 0x000055c40ae53808 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
> > ```
>
> Is the error `"Do not know how to scalarize this operator's operand!"`? I see there is no case in `ScalarizeVectorOperand` to scalarize `ISD::MSTORE`, but it shouldn't be too hard to add one.
It's not possible to create a scalar conditional store in SelectionDAG. It would need to split the basic block and introduce a branch over the store.
https://github.com/llvm/llvm-project/pull/145176
More information about the llvm-commits
mailing list