[llvm] [SelectionDAG] Reland debuginfo salvage for load/ext combines (PR #194700)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 00:39:44 PDT 2026
================
@@ -15044,11 +15119,22 @@ static SDValue tryToFoldExtOfLoad(SelectionDAG &DAG, DAGCombiner &Combiner,
DAG.getValueType(Load->getValueType(0).getScalarType()));
}
Combiner.ExtendSetCCUses(SetCCs, N0, Res, ExtOpc);
- Combiner.CombineTo(N, Res);
+ // If the load value is used only by N, replace it via CombineTo N.
+ unsigned Opcode_N = N->getOpcode();
+ bool IsSigned = Opcode_N == ISD::SIGN_EXTEND;
----------------
OCHyams wrote:
```suggestion
bool IsSigned = N->getOpcode() == ISD::SIGN_EXTEND;
```
nit: Not sure that variable `Opcode_N` is adding much here?
https://github.com/llvm/llvm-project/pull/194700
More information about the llvm-commits
mailing list