This is an archive of the discontinued LLVM Phabricator instance.

[X86] Merge the different SETcc instructions for each condition code into single instructions that store the condition code as an operand.
ClosedPublic

Authored by craig.topper on Apr 2 2019, 9:36 AM.

Details

Summary

This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between SETcc instructions and condition codes.

Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 2 2019, 9:36 AM
craig.topper marked an inline comment as done.
craig.topper added inline comments.
lib/Target/X86/X86FixupLEAs.cpp
158 ↗(On Diff #193314)

I'll pull this out of this patch and rebase later today.

Rebase as the X86FixupLEAs.cpp change was commited to trunk.

Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2019, 5:17 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
andreadb accepted this revision.Apr 4 2019, 2:50 AM

LGTM

This revision is now accepted and ready to land.Apr 4 2019, 2:50 AM
This revision was automatically updated to reflect the committed changes.