This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove X86ISD::LCMPXCHG8_SAVE_EBX_DAG and LCMPXCHG8B_SAVE_EBX pseudo instruction
ClosedPublic

Authored by craig.topper on Oct 5 2020, 2:16 PM.

Details

Summary

This and its friend X86ISD::LCMPXCHG8_SAVE_RBX_DAG are used if we need to avoid clobbering the frame pointer in EBX/RBX. EBX/RBX are only used a frame pointer in 64-bit mode. In 64-bit mode we don't use CMPXCHG8B since we have a GR64 cmpxchg available. So we don't need special handling for LCMPXCHG8B.

Split from D88808

Diff Detail

Event Timeline

craig.topper created this revision.Oct 5 2020, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2020, 2:16 PM
craig.topper requested review of this revision.Oct 5 2020, 2:16 PM
rnk accepted this revision.Oct 5 2020, 2:37 PM

lgtm

We might need to bring this back if one day we ever chose to use EBX as the base pointer, as MSVC does in 32-bit. We might choose to do that for better compatibility with MSVC inline asm, but we've gotten this far without needing it, and 32-bit becomes less relevant every month.

This revision is now accepted and ready to land.Oct 5 2020, 2:37 PM