[llvm] [X86] Fixed truncated masked stores (PR #179853)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 5 01:15:37 PST 2026


================
@@ -54187,6 +54090,14 @@ static SDValue reduceMaskedStoreToScalarStore(MaskedStoreSDNode *MS,
   SDValue Extract =
       DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Value, VecIndex);
 
+  if (MS->isTruncatingStore()) {
+    if (EltVT.isFloatingPoint())
+      return SDValue();
----------------
phoebewang wrote:

TRUNCATE is only for integer, and FTRUNC isn't bitwise identical. In theory, TruncatingStore should not have FP type, but we have a trick in line 54086 for i64 on 32-bit..

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


More information about the llvm-commits mailing list