This is an archive of the discontinued LLVM Phabricator instance.

[X86] Handle SETB_C32r/SETB_C64r in flag copy lowering the same way we handle SBB
ClosedPublic

Authored by craig.topper on Feb 6 2020, 11:49 AM.

Details

Summary

Previously we took the restore flag, extended it 32 or 64 bits. Then used as an input to a sub from 0. This requires creating a zero extend and creating a 0.

This patch changes this to just use an ADD with 255 to restore the carry flag and keep the SETB_C32r/SETB_C64r. Exactly like we handle SBB which is what SBB becomes.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 6 2020, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2020, 11:49 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon accepted this revision.Feb 7 2020, 10:03 AM

LGTM

This revision is now accepted and ready to land.Feb 7 2020, 10:03 AM
This revision was automatically updated to reflect the committed changes.