[llvm] c710d46 - [DAG] expandVECTOR_COMPRESS - remove superfluous getFreeze. NFC. (#150062)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 10:37:16 PDT 2025


Author: Simon Pilgrim
Date: 2025-07-22T18:37:12+01:00
New Revision: c710d460a5623c8445fabccd5a88e51085541d5b

URL: https://github.com/llvm/llvm-project/commit/c710d460a5623c8445fabccd5a88e51085541d5b
DIFF: https://github.com/llvm/llvm-project/commit/c710d460a5623c8445fabccd5a88e51085541d5b.diff

LOG: [DAG] expandVECTOR_COMPRESS - remove superfluous getFreeze. NFC. (#150062)

freeze(freeze(extract_vector_elt(x,i))) -> freeze(extract_vector_elt(x,i))

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index f2238efab68f6..1764910861df4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -11994,8 +11994,7 @@ SDValue TargetLowering::expandVECTOR_COMPRESS(SDNode *Node,
     // Get the mask value and add it to the current output position. This
     // either increments by 1 if MaskI is true or adds 0 otherwise.
     // Freeze in case we have poison/undef mask entries.
-    SDValue MaskI =
-        DAG.getFreeze(DAG.getExtractVectorElt(DL, MaskScalarVT, Mask, I));
+    SDValue MaskI = DAG.getExtractVectorElt(DL, MaskScalarVT, Mask, I);
     MaskI = DAG.getFreeze(MaskI);
     MaskI = DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, MaskI);
     MaskI = DAG.getNode(ISD::ZERO_EXTEND, DL, PositionVT, MaskI);


        


More information about the llvm-commits mailing list