[llvm] [DAG] Combine `store + vselect` to `masked_store` (PR #145176)
Abhishek Kaushik via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 4 02:01:57 PDT 2025
================
@@ -22534,6 +22534,55 @@ SDValue DAGCombiner::visitATOMIC_STORE(SDNode *N) {
return SDValue();
}
+static SDValue foldToMaskedStore(StoreSDNode *Store, SelectionDAG &DAG,
+ const SDLoc &Dl) {
+ if (!Store->isSimple() || !ISD::isNormalStore(Store))
+ return SDValue();
+
+ SDValue StoredVal = Store->getValue();
+ SDValue StorePtr = Store->getBasePtr();
+ SDValue StoreOffset = Store->getOffset();
+ EVT VT = Store->getMemoryVT();
+ unsigned AddrSpace = Store->getAddressSpace();
----------------
abhishek-kaushik22 wrote:
I can add that test, but what targets have `ISD::MSTORE` legal and use different address spaces? (I tried AMDGPU and NVPTX but the `llvm.masked.store` intrinsic is converted to a bunch of jumps)
https://github.com/llvm/llvm-project/pull/145176
More information about the llvm-commits
mailing list