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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 11:56:18 PST 2020


craig.topper created this revision.
craig.topper added reviewers: RKSimon, andreadb, chandlerc.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D74152

Files:
  llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
  llvm/test/CodeGen/X86/flags-copy-lowering.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74152.242968.patch
Type: text/x-patch
Size: 9214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/b943047b/attachment.bin>


More information about the llvm-commits mailing list