[llvm] 6d9065a - Revert "[ARM] Correctly handle execute-only in EmitStructByval"
Caslyn Tonelli via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 16:32:59 PDT 2023
Author: Caslyn Tonelli
Date: 2023-07-12T23:29:54Z
New Revision: 6d9065a7164b8f3eb1b3e3a17870cf9a51df4cbd
URL: https://github.com/llvm/llvm-project/commit/6d9065a7164b8f3eb1b3e3a17870cf9a51df4cbd
DIFF: https://github.com/llvm/llvm-project/commit/6d9065a7164b8f3eb1b3e3a17870cf9a51df4cbd.diff
LOG: Revert "[ARM] Correctly handle execute-only in EmitStructByval"
This reverts commit 210f61cbddeddac47b347db072d674ee142520f6.
Differential Revision: https://reviews.llvm.org/D155138
Added:
Modified:
llvm/lib/Target/ARM/ARMISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 3cdc01973d33ef..c7c61cdd229dbe 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -11513,12 +11513,18 @@ ARMTargetLowering::EmitStructByval(MachineInstr &MI,
// Load an immediate to varEnd.
Register varEnd = MRI.createVirtualRegister(TRC);
if (Subtarget->useMovt()) {
- BuildMI(BB, dl, TII->get(IsThumb ? ARM::t2MOVi32imm : ARM::MOVi32imm),
- varEnd)
- .addImm(LoopSize);
- } else if (Subtarget->genExecuteOnly()) {
- assert(IsThumb && "Non-thumb expected to have used movt");
- BuildMI(BB, dl, TII->get(ARM::tMOVi32imm), varEnd).addImm(LoopSize);
+ unsigned Vtmp = varEnd;
+ if ((LoopSize & 0xFFFF0000) != 0)
+ Vtmp = MRI.createVirtualRegister(TRC);
+ BuildMI(BB, dl, TII->get(IsThumb ? ARM::t2MOVi16 : ARM::MOVi16), Vtmp)
+ .addImm(LoopSize & 0xFFFF)
+ .add(predOps(ARMCC::AL));
+
+ if ((LoopSize & 0xFFFF0000) != 0)
+ BuildMI(BB, dl, TII->get(IsThumb ? ARM::t2MOVTi16 : ARM::MOVTi16), varEnd)
+ .addReg(Vtmp)
+ .addImm(LoopSize >> 16)
+ .add(predOps(ARMCC::AL));
} else {
MachineConstantPool *ConstantPool = MF->getConstantPool();
Type *Int32Ty = Type::getInt32Ty(MF->getFunction().getContext());
More information about the llvm-commits
mailing list