summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2024-05-22 11:59:37 +0800
committerWang Pengcheng <wangpengcheng.pp@bytedance.com>2024-05-22 11:59:37 +0800
commit66c619ac3ec6f644d051914fe402c84177ab9437 (patch)
tree9140fdac11dbe445151c892dc2c450bfcd6c7c86 /llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
parent591803e81f7ad7cd07ca129187504a867927a374 (diff)
parent97025bd9d5b32f984f07d6ae20a3ce6ddb3fbe2a (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/wangpc-pp/spr/main.aarch64-remove-usage-of-postrascheduler
Created using spr 1.3.6-beta.1 [skip ci]
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index 9e56de732c58..85bbfabf5d3c 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -4438,6 +4438,12 @@ bool PPCInstrInfo::isDefMIElgibleForForwarding(MachineInstr &DefMI,
if (Opc != PPC::ADDItocL8 && Opc != PPC::ADDI && Opc != PPC::ADDI8)
return false;
+ // Skip the optimization of transformTo[NewImm|Imm]FormFedByAdd for ADDItocL8
+ // on AIX which is used for toc-data access. TODO: Follow up to see if it can
+ // apply for AIX toc-data as well.
+ if (Opc == PPC::ADDItocL8 && Subtarget.isAIX())
+ return false;
+
assert(DefMI.getNumOperands() >= 3 &&
"Add inst must have at least three operands");
RegMO = &DefMI.getOperand(1);