[llvm] [RISCV] Fold (fmv_x_h/w (load)) to an integer load. (PR #109900)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 07:49:10 PDT 2024


================
@@ -16984,6 +16984,17 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N,
       return Op0.getOperand(0);
     }
 
+    if (ISD::isNormalLoad(Op0.getNode()) && Op0.hasOneUse() &&
----------------
preames wrote:

Is there something here preventing the load from having an offset?   I think the answer is that the load must be a vector load, and that we don't have base+offset addressing for that form, but could you add an assert here to confirm the offset is zero?

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


More information about the llvm-commits mailing list