[llvm] [X86] Combine `store + vselect` to `masked_store` (PR #145176)

Abhishek Kaushik via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 01:06:23 PDT 2025


================
@@ -53403,6 +53404,76 @@ static SDValue combineMaskedStore(SDNode *N, SelectionDAG &DAG,
   return SDValue();
 }
 
+static SDValue foldToMaskedStore(StoreSDNode *Store, SelectionDAG &DAG,
+                                 const SDLoc &Dl,
+                                 const X86Subtarget &Subtarget) {
----------------
abhishek-kaushik22 wrote:

The `ISD::MSTORE` may be legal or custom on many targets that do not have a conditional store instruction, for example in case of sse2 it's lowered as checking the mask bits individually and storing each scalar value.
I might be missing some other way of checking for it, please suggest if that's the case.

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


More information about the llvm-commits mailing list