[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 25 02:53:04 PDT 2020
dmgreen added a reviewer: efriedma.
dmgreen added a comment.
Thanks. Nice test.
================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:286
+ switch (Opcode) {
+ case ARM::LEApcrel:
+ return 4;
----------------
We should also include ARM::LEApcrelJT, as they can use SoImm's too.
================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:287
+ case ARM::LEApcrel:
+ return 4;
+ case ARM::t2LEApcrel:
----------------
Why 4 and not 8? I think it's meant to be "2 instructions widths"
================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:288
+ return 4;
+ case ARM::t2LEApcrel:
+ default:
----------------
You needn't add t2LEApcrel here. There are lots of opcodes that could be pc-relative (as in initializeFunctionInfo). We only need to include the ones we are being careful about the adjustment - the SoImm codes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84923/new/
https://reviews.llvm.org/D84923
More information about the llvm-commits
mailing list