[llvm] [SelectionDAG] Make sure demanded lanes for AND/MUL-by-zero are frozen (PR #180727)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 07:04:48 PST 2026


================
@@ -1763,6 +1763,11 @@ class SelectionDAG {
   /// Return a freeze using the SDLoc of the value operand.
   LLVM_ABI SDValue getFreeze(SDValue V);
 
+  /// Return a freeze of V if any of the demanded elts may be undef or poison.
+  /// If \p PoisonOnly is true, then only check for poison elements.
+  LLVM_ABI SDValue getFreeze(SDValue V, APInt DemandedElts,
----------------
RKSimon wrote:

```suggestion
  LLVM_ABI SDValue getFreeze(SDValue V, const APInt &DemandedElts,
```

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


More information about the llvm-commits mailing list