[llvm] [DAG] Combine `store + vselect` to `masked_store` (PR #145176)
Abhishek Kaushik via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 22:09:18 PDT 2025
abhishek-kaushik22 wrote:
> 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.
Sorry, you are right. In that case maybe we need stricter checks before we do this combine, I guess
```cpp
if (!TLI.isOperationLegalOrCustom(ISD::MSTORE, VT) ||
!TLI.allowsMisalignedMemoryAccesses(VT, AddrSpace, Alignment))
return SDValue();
```
is not enough. I assumed that the `isOperationLegalOrCustom` will handle cases with illegal types.
https://github.com/llvm/llvm-project/pull/145176
More information about the llvm-commits
mailing list