[PATCH] D60294: [DAGCombiner] [CodeGenPrepare] WIP/RFC Splitting large offsets from base addresses
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 13 07:19:28 PDT 2019
luismarques added a comment.
In D60294#1456609 <https://reviews.llvm.org/D60294#1456609>, @efriedma wrote:
> Should we care about the number of uses of N0 here? It should generally be "safe" to reassociate in cases where it only has one use.
Let's say we are doing `*(x + 0x10000 + 2)` and we don't use `x + 0x10000` anywhere else (that's the `N0`, right?). In an arch like RISC-V if we want to add `0x10002` to `x` that takes two instructions to materialize the constant, while `0x10000` only takes one. We can avoid that second instruction by folding the +2 into the load/store. Am I thinking about this wrong?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60294/new/
https://reviews.llvm.org/D60294
More information about the llvm-commits
mailing list