[PATCH] D33404: [PowerPC] Fix a performance bug for PPC::XXPERMDI.
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 28 21:13:33 PDT 2017
nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.
In addition to the inline nit, I think it'd be more natural to use the `v2i64` type for this `PPCISD` node (and the instruction) since the instruction inherently operates on doublewords. You should be able to just change the type you bitcast to in the C++ code as well as the type you match in the TblGen code.
Otherwise, LGTM.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:1761
+// Set \p Swap to true only if the function return true AND element 0 of the
+// result comes from the first input (LE) or second input (BE), i.e., the inputs
----------------
A couple of nits that can just be addressed on the commit (no need for another revision):
- This appears to use doxygen-frendly comments with parameter tags, etc. I think doxygen will only use comments that start with three slashes (`///`).
- I find it confusing for the comment to jump into the implementation like this. A short sentence explaining what the function does, then some details as needed. For example:
```
/// Can node \p N be lowered to an XXPERMDI instruction? If so, set \p Swap
/// if the inputs to the instruction should be swapped and set \p DM to the
/// value for the immediate.
```
https://reviews.llvm.org/D33404
More information about the llvm-commits
mailing list