[all-commits] [llvm/llvm-project] 278578: [X86] Handle SETB_C32r/SETB_C64r in flag copy lowe...

topperc via All-commits all-commits at lists.llvm.org
Fri Feb 7 10:31:41 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 278578744a4773d592c8b4be6827472a4a77a9c8
      https://github.com/llvm/llvm-project/commit/278578744a4773d592c8b4be6827472a4a77a9c8
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

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

  Log Message:
  -----------
  [X86] Handle SETB_C32r/SETB_C64r in flag copy lowering the same way we handle SBB

Previously we took the restored flag in a GPR, 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 SETB becomes.

Differential Revision: https://reviews.llvm.org/D74152




More information about the All-commits mailing list