[llvm] [SelectionDAG] Combine range metadata when loads are CSEd. (PR #146026)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 22:17:08 PDT 2025


================
@@ -9111,6 +9111,7 @@ SDValue SelectionDAG::getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT,
   void* IP = nullptr;
   if (SDNode *E = FindNodeOrInsertPos(ID, dl, IP)) {
     cast<AtomicSDNode>(E)->refineAlignment(MMO);
+    cast<AtomicSDNode>(E)->refineRanges(MMO);
----------------
arsenm wrote:

Maybe these should be combined into one helper to handle the merge of all the modifiers on the MMO? Are there other uses that want to only change the alignment alone?

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


More information about the llvm-commits mailing list