[PATCH] D17781: Codegen: [PPC] Word Rotates are Zero Extending

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 12:43:25 PST 2016


iteratee added inline comments.

================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:1559
@@ +1558,3 @@
+  bool isZeroExtendingRotate  =
+      (MIOpC == PPC::RLWINM || MIOpC == PPC::RLWNM)
+      && MI->getOperand(3).getImm() <= MI->getOperand(4).getImm();
----------------
kbarton wrote:
> iteratee wrote:
> > I actually meant to use PPC::RLWNM.
> > I added a test case to cover this.
> OK, this might be a dumb question then but why not include the dot version of the instructions (RLWINMo and RLWNMo) as well?
I've added them, but maybe someone else can chime in. Is the goal of checking for those forms to allow for the collapse of multiple compares? Is this something that shows up in real code, or a belt/suspenders check?


http://reviews.llvm.org/D17781





More information about the llvm-commits mailing list