[llvm] [SelectionDAG] Look through ISD::FREEZE in SimplifyDemanded checks (PR #200931)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 21:22:37 PDT 2026


================
@@ -3233,6 +3235,8 @@ bool TargetLowering::SimplifyDemandedVectorElts(
     KnownUndef.setAllBits();
     return false;
   }
+  if (peekThroughFreeze(Op).isUndef())
+    return false;
----------------
krzysz00 wrote:

... Ok, upon further investigation, combining this with the previous case (that sets "KnownUndef") meaningfully changes a bunch of tests. I think I'll need to check up on the exact semantics on that mask to see if `freeze poison` or `freeze undef` should set that mask too.

Do any of y'all know?

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


More information about the llvm-commits mailing list