[llvm] [X86]RMW instrs not handled in pre-RA-sched=fast (PR #67281)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 00:17:37 PDT 2023
================
@@ -231,6 +231,11 @@ SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
if (!TII->unfoldMemoryOperand(*DAG, N, NewNodes))
return nullptr;
+ // unfolding an x86 RMW operation results in store, dec, load which
+ // can't be handled here so quit
+ if (NewNodes.size() == 3)
+ return nullptr;
+
----------------
XinWang10 wrote:
[patch](https://github.com/llvm/llvm-project/commit/7c7ba1baa1bb339273ee279083e99b7eddb0bf79) in ScheduleDAGRRList.cpp was fixed in this way, then maybe need to add 1 function to TargetInstrInfo if that.
But I may raise another PR which could disable unfold for X86 RMW instrs, I just find it could also fix it, if that patch could be landed then I would abandon this one otherwise we may add a function to TargetInstrInfo.cpp if we want to use specific function.
https://github.com/llvm/llvm-project/pull/67281
More information about the llvm-commits
mailing list