[PATCH] D84923: [ARM] Fix so immediates and pc relative checks
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 04:47:10 PDT 2020
dmgreen added a comment.
Thanks. That does fix the problems I was seeing in thumb2 codesize test cases.
I am still unsure about the PCOffset change. Is that for correctness or an optimisation? Or correctness specific to SoImm due to it's non-uniform nature? I would be fairly surprised if we were always getting the limit of a t2ADR wrong and it had not caused problems up to this point. Either way, can we add some tests for it? And if it is just an independent optimization, consider moving it to a separate patch.
================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1011-1012
bool NegativeOK, bool IsSoImm) {
- if (UserOffset <= TrialOffset) {
+ long int Delta =
+ (long int)TrialOffset - ((long int)PCOffset + (long int)UserOffset);
+ if (Delta >= 0) {
----------------
long int -> int64_t
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84923/new/
https://reviews.llvm.org/D84923
More information about the llvm-commits
mailing list