[X86] Simplify part of the isel for X86ISD::FCMP/STRICT_FCMP/STRICT_FCMPS.
authorCraig Topper <craig.topper@sifive.com>
Fri, 25 Jun 2021 17:58:23 +0000 (10:58 -0700)
committerCraig Topper <craig.topper@sifive.com>
Fri, 25 Jun 2021 18:39:01 +0000 (11:39 -0700)
commit0f3bc00a7d3cb223b4d5639723b8f71341c9df1e
tree79506e557c6587be176424b45898f251af19811b
parentcc60fa2685bdbff889df826a1bfd5e52ffd163c8
[X86] Simplify part of the isel for X86ISD::FCMP/STRICT_FCMP/STRICT_FCMPS.

We don't need to have the compare output a value and then copy it
to FPSW for use by FNSTSW. Instead we can just have the compare
output Glue and glue the FNSTSW to it. InstrEmitter effectively
performed this optimization when emitting the Machine IR. Doing
it directly simplifies the codes and reduces the work in
InstrEmitter. There's no change in the machine IR at the end of
isel before and after this change.
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp