[llvm] [DAGCombiner][X86] Push bitcast/ext through freeze for loads (PR #163070)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 04:21:37 PDT 2025
================
@@ -16944,6 +16944,23 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
if (N0.getOpcode() == ISD::SRA || N0.getOpcode() == ISD::SRL)
return SDValue();
+ // fold: bitcast(freeze(load)) -> freeze(bitcast(load))
----------------
RKSimon wrote:
Why didn't you try to do this in visitBITCAST and add FREEZE handling into the existing BITCAST(LOAD) fold?
My concern is that we already have had problems with ReplaceAllUsesWith with frozen/unfrozen uses of a node, and worry this might add to it.
https://github.com/llvm/llvm-project/pull/163070
More information about the llvm-commits
mailing list