[llvm] [DAG] expandVECTOR_COMPRESS - remove superfluous getFreeze. NFC. (PR #150062)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 09:47:32 PDT 2025
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/150062
freeze(freeze(extract_vector_elt(x,i))) -> freeze(extract_vector_elt(x,i))
>From b064da67757e822104de75cc297181ad642cb1c5 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Tue, 22 Jul 2025 17:46:36 +0100
Subject: [PATCH] [DAG] expandVECTOR_COMPRESS - remove superfluous getFreeze.
NFC.
freeze(freeze(extract_vector_elt(x,i))) -> freeze(extract_vector_elt(x,i))
---
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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