[PATCH] D76380: [PowerPC][AIX] Implement by-val caller arguments in multiple registers

Chris Bowler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 13:34:50 PDT 2020


cebowleratibm marked 5 inline comments as done.
cebowleratibm added a comment.

I still have to update the tests as per Sean's suggestion but I'll post the updated code for now.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7166
+          // Adjust the load offset by the number of bytes read so far.
+          SDNodeFlags AddFlags;
+          AddFlags.setNoUnsignedWrap(true);
----------------
sfertile wrote:
> We do this same operation twice in this function, and the same pattern appears several times elsewhere in the file. I suggest putting it in a well named helper function.  Only bother using for the 2 uses in this function for this patch, then we can convert some of the other uses in NFC patches.
Fair point.  I've opted to use a lambda to common this up.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7167
+          SDNodeFlags AddFlags;
+          AddFlags.setNoUnsignedWrap(true);
+          LoadAddr =
----------------
cebowleratibm wrote:
> sfertile wrote:
> > If we are setting the no-wrap flags maybe we should set both.
> Are you referring to setNoSignedWrap?
> 
> Digging a bit more, I think we can use SelectionDAG::getObjectPtrOffset
getObjectPtrOffset doesn't setNoSignedWrap but if that's suboptimal I think that's another patch entirely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76380/new/

https://reviews.llvm.org/D76380





More information about the llvm-commits mailing list