[all-commits] [llvm/llvm-project] 1b12b1: [ARM] Restructure MOVi32imm expansion to not do po...
john-brawn-arm via All-commits
all-commits at lists.llvm.org
Wed Jul 19 05:56:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1b12b1a33520fc3a1cb7b22274312a86ce7a3718
https://github.com/llvm/llvm-project/commit/1b12b1a33520fc3a1cb7b22274312a86ce7a3718
Author: John Brawn <john.brawn at arm.com>
Date: 2023-07-19 (Wed, 19 Jul 2023)
Changed paths:
M llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
M llvm/test/CodeGen/ARM/execute-only-big-stack-frame.ll
M llvm/test/CodeGen/ARM/execute-only.ll
M llvm/test/CodeGen/ARM/large-stack.ll
M llvm/test/CodeGen/Thumb2/segmented-stacks.ll
Log Message:
-----------
[ARM] Restructure MOVi32imm expansion to not do pointless instructions
The expansion of the various MOVi32imm pseudo-instructions works by
splitting the operand into components (either halfwords or bytes) and
emitting instructions to combine those components into the final
result. When the operand is an immediate with some components being
zero this can result in pointless instructions that just add zero.
Avoid this by restructuring things so that a separate function handles
splitting the operand into components, then don't emit the component
if it is a zero immediate. This is straightforward for movw/movt,
where we just don't emit the movt if it's zero, but the thumb1
expansion using mov/add/lsl is more complex, as even when we don't
emit a given byte we still need to get the shift correct.
Differential Revision: https://reviews.llvm.org/D154943
Commit: cee7e7b2454d5dc35c012f35d6945c12fbc5b075
https://github.com/llvm/llvm-project/commit/cee7e7b2454d5dc35c012f35d6945c12fbc5b075
Author: John Brawn <john.brawn at arm.com>
Date: 2023-07-19 (Wed, 19 Jul 2023)
Changed paths:
M llvm/lib/Target/ARM/ARMISelLowering.cpp
M llvm/test/CodeGen/ARM/execute-only.ll
Log Message:
-----------
[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
Compare: https://github.com/llvm/llvm-project/compare/84f888ca82a1...cee7e7b2454d
More information about the All-commits
mailing list