aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Utils.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-03-29 09:54:26 -0700
committerCraig Topper <craig.topper@sifive.com>2021-03-29 10:06:17 -0700
commit54bacaf31127ee9d19e8df7ad7de5c94a4fc7c62 (patch)
tree1dda5b402a15e078bc60c7b6ab8001868e7d6670 /llvm/lib/Transforms/Utils/Utils.cpp
parentef76a333faca3e41036f60bb598173d410aab24b (diff)
downloadllvm-54bacaf31127ee9d19e8df7ad7de5c94a4fc7c62.zip
llvm-54bacaf31127ee9d19e8df7ad7de5c94a4fc7c62.tar.gz
llvm-54bacaf31127ee9d19e8df7ad7de5c94a4fc7c62.tar.bz2
[X86] Always use rip-relative addressing on 64-bit when rematerializing all zeros/ones registers using a folded load.
Previously we only used RIP relative when PIC was enabled. But we know we're in small/kernel code model here so we should be able to always use RIP-relative which will give a smaller encoding. Here's a godbolt link that demonstrates the current codegen https://godbolt.org/z/j3158o Note in the non-PIC version the load from .LCPI0_0 doesn't use RIP-relative addressing, but if you change the constant in the source from 0.0 to 1.0 it will become RIP-relative. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D97208
Diffstat (limited to 'llvm/lib/Transforms/Utils/Utils.cpp')
0 files changed, 0 insertions, 0 deletions