[PATCH] D94058: [PowerPC] Sign extend comparison operand for signed atomic comparisons

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 19:57:58 PST 2021


nemanjai created this revision.
nemanjai added reviewers: vchuravy, PowerPC.
Herald added subscribers: shchenz, jfb, kbarton, hiraditya.
nemanjai requested review of this revision.
Herald added a project: LLVM.

As of 8dacca943af8a53a23b1caf3142d10fb4a77b645, we sign extend the atomic loaded operand for signed subword comparisons. However, the assumption that the other operand is correctly sign extended doesn't always hold. This patch sign extends the other operand if it needs to be sign extended.

This is a second fix for https://bugs.llvm.org/show_bug.cgi?id=30451


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94058

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/atomics-regression.ll
  llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94058.314493.patch
Type: text/x-patch
Size: 37654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210105/3e0a5edc/attachment.bin>


More information about the llvm-commits mailing list