[llvm] 3a24747 - [DAG] Use TLO.LegalTypes() instead of AfterLegalizeTypes (#201840)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 05:01:49 PDT 2026


Author: Simon Pilgrim
Date: 2026-06-06T13:01:44+01:00
New Revision: 3a247473cf32b29d254827e1c03b88a444438a35

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

LOG: [DAG] Use TLO.LegalTypes() instead of AfterLegalizeTypes (#201840)

Fix typo from #178617 - AfterLegalizeTypes is an enum constant, not an actual check for legalised types

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 a8ceab03a0f4f..a364186c68b67 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -3732,7 +3732,7 @@ bool TargetLowering::SimplifyDemandedVectorElts(
         // If we're after type legalization and SrcSVT is not legal, use the
         // promoted type for creating constants to avoid creating nodes with
         // illegal types.
-        if (AfterLegalizeTypes)
+        if (TLO.LegalTypes())
           SrcSVT = getLegalTypeToTransformTo(*TLO.DAG.getContext(), SrcSVT);
 
         SmallVector<SDValue> MaskElts;


        


More information about the llvm-commits mailing list