[llvm] [DAGCombiner][X86] Push bitcast/ext through freeze for loads (PR #163070)
    Guy David via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 04:28:38 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))
----------------
guy-david wrote:
Also, this will fold only when the `FREEZE` node has a single use.
https://github.com/llvm/llvm-project/pull/163070
    
    
More information about the llvm-commits
mailing list