[PATCH] D92089: [PowerPC] Materialize i64 constants by enumerated patterns.
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 13:42:58 PST 2020
stefanp added a comment.
Thank you for the explanations!
I'm fine with keeping the if conditions looking similar and avoiding too many test changes.
I have one more question related to the patterns.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:899
+ // after rotation.
+ if ((LZ + FO + TO) > 48) {
+ Result = CurDAG->getMachineNode(PPC::LI8, dl, MVT::i64,
----------------
One more question: Isn't this the pattern above just a subset of this one?
```
if ((LZ + TO) > 48) {
...
}
if ((LZ + FO + TO) > 48) {
...
}
```
They both use only two instructions to materialize the constant. If you delete the first one the second one will also catch all of those cases and be the same number of instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92089/new/
https://reviews.llvm.org/D92089
More information about the llvm-commits
mailing list