Skip to content

Commit

Permalink
Revert "[ARM] Correctly handle execute-only in EmitStructByval"
Browse files Browse the repository at this point in the history
This reverts commit 210f61c.

Differential Revision: https://reviews.llvm.org/D155138
  • Loading branch information
Caslyn committed Jul 12, 2023
1 parent b115591 commit 6d9065a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions llvm/lib/Target/ARM/ARMISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 6d9065a

Please sign in to comment.