[PATCH] D41856: [PowerPC] Zero-extend the compare operand for ATOMIC_CMP_SWAP

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 13:09:34 PST 2018


nemanjai added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:8876
+  // ATOMIC_CMP_SWAP is Legal and ATOMIC_CMP_SWAP_WITH_SUCCESS needs to be
+  // Expanded.
+  return ToExpand ? SDValue() : Op;
----------------
efriedma wrote:
> nemanjai wrote:
> > efriedma wrote:
> > > Do you really need to custom-lower ATOMIC_CMP_SWAP_WITH_SUCCESS, given that we're just going to call into the custom lowering code again with the generated ATOMIC_CMP_SWAP?
> > Well, unless your patch or Uli's (D41798 or D38215) to zero-extend the operand to the generated `SETCC` lands, I need to do it for both, don't I? I certainly continue to get failures if I don't do this for both nodes without one of those patches.
> Oh, yes, you're right.  Hopefully we can get that landed soon, though.
OK. So I'll update this to only handle `ATOMIC_CMP_SWAP` assuming that the other patch will be committed soon. When they land, I'll ask for both to be merged in 6.0. Does that sound like a reasonable plan?


Repository:
  rL LLVM

https://reviews.llvm.org/D41856





More information about the llvm-commits mailing list