[llvm] [SelectionDAG] Look through ISD::FREEZE in SimplifyDemanded checks (PR #200931)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 02:25:03 PDT 2026
================
@@ -714,8 +714,10 @@ SDValue TargetLowering::SimplifyMultipleUseDemandedBits(
if (Depth >= SelectionDAG::MaxRecursionDepth)
return SDValue();
- // Ignore UNDEFs.
- if (Op.isUndef())
+ // Ignore undef/poison, including frozen undef/poison. Replacing a freeze of
+ // undef/poison with another undef node is unnecessary and can fight with
+ // freeze sinking.
+ if (peekThroughFreeze(Op).isUndef())
----------------
RKSimon wrote:
it would be better if you do a pr fr each of these separately, each with their own test coverage
https://github.com/llvm/llvm-project/pull/200931
More information about the llvm-commits
mailing list