[PATCH] D57445: [ARM] Fix TTI IntImmCost
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 09:08:28 PST 2019
efriedma added inline comments.
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:99
+ if (BitWidth - LeadingZeros - TrailingZeros <= 8)
+ return 0;
+
----------------
Why are you throwing away the existing code using getT2SOImmVal/getSOImmVal and writing out the same logic inline?
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:108
+ // Use mov and movt
return 2;
+ }
----------------
Should this be guarded by useMovt?
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:158
+ if (Opcode == Instruction::GetElementPtr) {
+ // FIXME Simplify by assuming 32-bit access, which uses an 8-bit offset
----------------
Not sure I follow this logic; what does "Imm" actually mean in this case? Are we expecting that the result of the GEP will be folded into a load?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57445/new/
https://reviews.llvm.org/D57445
More information about the llvm-commits
mailing list