[PATCH] D57445: [ARM] Fix TTI IntImmCost
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 03:22:21 PST 2019
samparker marked 3 inline comments as done.
samparker added a comment.
I like that idea, I think moving the logic into ARMISelLowering would be good as we already use similar logic there too.
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:99
+ if (BitWidth - LeadingZeros - TrailingZeros <= 8)
+ return 0;
+
----------------
efriedma wrote:
> Why are you throwing away the existing code using getT2SOImmVal/getSOImmVal and writing out the same logic inline?
Thanks, I'll revert.
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:108
+ // Use mov and movt
return 2;
+ }
----------------
efriedma wrote:
> Should this be guarded by useMovt?
Will do.
================
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
----------------
efriedma wrote:
> 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?
Yes, I'm assuming an immediate index which will be directly used by a load/store. I know this assumption doesn't hold all the time... But I'm not sure what to do with the limited information here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57445/new/
https://reviews.llvm.org/D57445
More information about the llvm-commits
mailing list