[PATCH] D53972: [ARM][CGP] Negative constant operand handling
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 07:14:11 PDT 2018
SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.
Cheers, LGTM!
================
Comment at: lib/Target/ARM/ARMCodeGenPrepare.cpp:556
+
// Then mutate the types of the instructions within the tree. Here we handle
// constant operands.
----------------
After the reshuffle, "Then mutate .. " can probably now just be "Mutate .."
================
Comment at: lib/Target/ARM/ARMCodeGenPrepare.cpp:584
// Now we need to remove any zexts that have become unnecessary, as well
// as insert any intrinsics.
----------------
Here we start doing the next thing, you could put this in another helper function, so that we have a call sequence something like this:
...
PromoteTree()
OptimizeTree() // i.e. this code
TruncateSinks()
in Mutate().
================
Comment at: lib/Target/ARM/ARMCodeGenPrepare.cpp:680
+ TruncTysMap[V] = V->getType();
+
+ // Convert adds and subs using negative immediates to equivalent instructions
----------------
Oh yes, exactly what I was hoping for, this reads very, very nice! :-)
https://reviews.llvm.org/D53972
More information about the llvm-commits
mailing list