[all-commits] [llvm/llvm-project] 4175d7: [X86] Custom isel floating point X86ISD::CMP on pr...

topperc via All-commits all-commits at lists.llvm.org
Thu Feb 6 10:43:51 PST 2020


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.h
    M llvm/lib/Target/X86/X86InstrFPStack.td
    M llvm/lib/Target/X86/X86InstrInfo.td

  Log Message:
  -----------
  [X86] Custom isel floating point X86ISD::CMP on pre-CMOV targets. Eliminate ConvertCmpIfNecessary

If we don't have cmov, X87 compares write to FPSW and we need to
move the bits to EFLAGS to use as JCC/SETCC/CMOV conditions.

Previously this was done by calling ConvertCmpIfNecessary in
multiple places which would emit the extra code for the FNSTSW,
a shift, a truncate, and a SAHF instructions. Isel would then
select trunc+X86ISD::CMP to a FUCOM instruction that produces FPSW.

This patch centralizes all of the handling into a single custom
isel handler. This allows us to remove ConvertCmpIfNecessary and
a couple target specific ISD opcodes.

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




More information about the All-commits mailing list