This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Fix codegen of atomicrmw nand
ClosedPublic

Authored by lrzlin on Oct 15 2022, 9:21 AM.

Details

Summary

Fix invalid RISCV-like MI being emitted for performing the not operation: the LoongArch xori zero-extends the immediate, hence is not equivalent to RISCV xori. The LoongArch not is a nor with zero.

Diff Detail

Event Timeline

lrzlin created this revision.Oct 15 2022, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2022, 9:21 AM
lrzlin requested review of this revision.Oct 15 2022, 9:21 AM
xen0n retitled this revision from [LoongArch] Fix atomicrmw nand instruction generate to [LoongArch] Fix codegen of atomicrmw nand.Oct 15 2022, 10:32 PM
xen0n edited the summary of this revision. (Show Details)
xen0n accepted this revision.Oct 15 2022, 10:34 PM

Thanks for the catch! Maybe we've read too much RISCV assembly to notice this. /facepalms

BTW I've edited the patch title and summary for you. Please check if I did it right.

This revision is now accepted and ready to land.Oct 15 2022, 10:34 PM
xry111 accepted this revision.Oct 16 2022, 6:49 AM
gonglingqin accepted this revision.Oct 16 2022, 6:04 PM

Thanks!

SixWeining accepted this revision.Oct 16 2022, 9:53 PM

LGTM. Thanks.

update test case

This revision was landed with ongoing or failed builds.Oct 18 2022, 5:43 AM
This revision was automatically updated to reflect the committed changes.