diff options
author | John Brawn <john.brawn@arm.com> | 2023-07-06 10:43:40 +0100 |
---|---|---|
committer | John Brawn <john.brawn@arm.com> | 2023-07-12 11:48:01 +0100 |
commit | 647aff28558b6b1379f0892138059b403192512a (patch) | |
tree | 55a1dae36756c3977f43977fcfe27145fb9cde9d /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 31dda3913f9d99049845b02202ee9fc9a4971de9 (diff) | |
download | llvm-647aff28558b6b1379f0892138059b403192512a.zip llvm-647aff28558b6b1379f0892138059b403192512a.tar.gz llvm-647aff28558b6b1379f0892138059b403192512a.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions