[ARM] Correctly handle execute-only in EmitStructByval
authorJohn Brawn <john.brawn@arm.com>
Wed, 5 Jul 2023 15:21:51 +0000 (16:21 +0100)
committerJohn Brawn <john.brawn@arm.com>
Wed, 19 Jul 2023 12:56:36 +0000 (13:56 +0100)
commitcee7e7b2454d5dc35c012f35d6945c12fbc5b075
treea0458ee70cf236ddece6e26692e29868b97f5487
parent1b12b1a33520fc3a1cb7b22274312a86ce7a3718
[ARM] Correctly handle execute-only in EmitStructByval

Currently when compiling for an execute-only target without movt then
EmitStructByval will generate a constant pool load which isn't
compatible with execute-only. Handle this by emitting tMOVi32imm,
and also simplify the existing movt handling by emitting t2MOVi32imm
or MOVi32imm.

Differential Revision: https://reviews.llvm.org/D154944
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/execute-only.ll