This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Sign extend comparison operand for signed atomic comparisons
ClosedPublic

Authored by nemanjai on Jan 4 2021, 7:57 PM.

Details

Summary

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

Diff Detail

Event Timeline

nemanjai created this revision.Jan 4 2021, 7:57 PM
nemanjai requested review of this revision.Jan 4 2021, 7:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2021, 7:57 PM
vchuravy added a subscriber: Restricted Project.Jan 5 2021, 7:57 AM
bsaleil added a subscriber: bsaleil.Jan 5 2021, 8:47 AM
bsaleil added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
11448

This line and 11446 are duplicate

nemanjai added inline comments.Jan 8 2021, 7:50 AM
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
11448

Ah, yes. Thank you.

vchuravy accepted this revision.Jan 15 2021, 11:26 AM

Good to go from the Julia side.

This revision is now accepted and ready to land.Jan 15 2021, 11:26 AM
This revision was landed with ongoing or failed builds.Jan 18 2021, 7:19 PM
This revision was automatically updated to reflect the committed changes.