This is an archive of the discontinued LLVM Phabricator instance.

[X86] Use lock add/sub for cases that we only care about the EFLAGS
ClosedPublic

Authored by pengfei on Nov 9 2022, 6:11 AM.

Details

Summary

This fixes #36373, #36905 and partial of #58685.

Diff Detail

Event Timeline

pengfei created this revision.Nov 9 2022, 6:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 6:11 AM
pengfei requested review of this revision.Nov 9 2022, 6:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 6:11 AM
RKSimon added inline comments.Nov 9 2022, 10:33 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
31407

m_OneUse(m_c_Add(...)) ?

31415

m_OneUse(m_Sub(...))?

31435

assert ICI->getPredicate() for EQ/SLT ?

llvm/test/CodeGen/X86/pr58685.ll
4

Cleanup the method names and drop the dso_local / atttributes etc?

pengfei updated this revision to Diff 474412.Nov 9 2022, 6:42 PM
pengfei marked 4 inline comments as done.

Address review comments. Thanks @RKSimon !

pengfei updated this revision to Diff 474416.Nov 9 2022, 7:26 PM

Fix typo.

RKSimon accepted this revision.Nov 17 2022, 7:00 AM

LGTM (with the test precommit) - cheers

llvm/test/CodeGen/X86/pr58685.ll
49

Please pre-commit these tests with current codegen and rebase the patch so that the commit shows the codegen diff

This revision is now accepted and ready to land.Nov 17 2022, 7:00 AM
This revision was landed with ongoing or failed builds.Nov 18 2022, 5:44 AM
This revision was automatically updated to reflect the committed changes.