OSDN Git Service

[DAGCombiner] Add combine for (not (strict_fsetcc)) to create a strict_fsetcc with...
authorCraig Topper <craig.topper@intel.com>
Fri, 24 Jan 2020 21:28:11 +0000 (13:28 -0800)
committerCraig Topper <craig.topper@intel.com>
Fri, 24 Jan 2020 22:15:36 +0000 (14:15 -0800)
commitd3bf06bc81e38202ab2684b17f6bdb23784173d7
tree97e762cee7d332de870a493ed5dcfc7bda712a08
parent118efa5cda868604f3507760ca061f69b0050b19
[DAGCombiner] Add combine for (not (strict_fsetcc)) to create a strict_fsetcc with the opposite condition.

Unlike the existing code that I modified here, I only handle the
case where the strict_fsetcc has a single use. Not sure exactly
how to handle multiples uses.

Testing this on X86 is hard because we already have a other
combines that get rid of lowered version of the integer setcc that
this xor will eventually become. So this combine really just
saves a bunch of extra nodes being created. Not sure about other
targets.

Differential Revision: https://reviews.llvm.org/D71816
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll