diff options
author | hanbeom <kese111@gmail.com> | 2024-05-20 09:57:50 +0100 |
---|---|---|
committer | David Green <david.green@arm.com> | 2024-05-20 09:57:50 +0100 |
commit | ce1a0d8ad380d12dc7ea001cfab3749bb23d445d (patch) | |
tree | dfd72c4dcc014e602334fce5c7a326defa7a37b7 /clang/lib/CodeGen/CoverageMappingGen.cpp | |
parent | 384bf545a1a7d8dfd16afd20ef07eb845495bac4 (diff) | |
download | llvm-ce1a0d8ad380d12dc7ea001cfab3749bb23d445d.zip llvm-ce1a0d8ad380d12dc7ea001cfab3749bb23d445d.tar.gz llvm-ce1a0d8ad380d12dc7ea001cfab3749bb23d445d.tar.bz2 |
[AArch64] Optimize `MOV` to `ORR` when load symmetric constants (#86249)
This change looks for cases of symmetric constant loading.
`symmetric constant load` is when the upper 32 bits and lower 32 bits
of a 64-bit register load the same value.
When it finds this, it replaces it with an instruction that loads only
the lower 32 bits of the constant and stores it in the upper and lower
bits simultaneously.
For example:
renamable $x8 = MOVZXi 49370, 0
renamable $x8 = MOVKXi $x8, 320, 16
renamable $x8 = MOVKXi $x8, 49370, 32
renamable $x8 = MOVKXi $x8, 320, 48
becomes
renamable $x8 = MOVZXi 49370, 0
renamable $x8 = MOVKXi $x8, 320, 16
renamable $x8 = ORRXrs $x8, $x8, 32
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
0 files changed, 0 insertions, 0 deletions