[SystemZ] Optimize floating-point comparisons with zero
This follows the same lines as the integer code. In the end it seemed
easier to have a second 4-bit mask in TSFlags to specify the compare-like
CC values. That eats one more TSFlags bit than adding a CCHasUnordered
would have done, but it feels more concise.
llvm-svn: 187883
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td
index 667cab3..954df11 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td
+++ b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td
@@ -66,12 +66,9 @@
// SystemZ::CCMASK_*.
bits<4> CCValues = 0;
- // True if the instruction sets CC to 0 when the result is 0.
- bit CCHasZero = 0;
-
- // True if the instruction sets CC to 1 when the result is less than 0
- // and to 2 when the result is greater than 0.
- bit CCHasOrder = 0;
+ // The subset of CCValues that have the same meaning as they would after
+ // a comparison of the first operand against zero.
+ bits<4> CompareZeroCCMask = 0;
// True if the instruction is conditional and if the CC mask operand
// comes first (as for BRC, etc.).
@@ -91,11 +88,10 @@
let TSFlags{4} = Is128Bit;
let TSFlags{9-5} = AccessBytes;
let TSFlags{13-10} = CCValues;
- let TSFlags{14} = CCHasZero;
- let TSFlags{15} = CCHasOrder;
- let TSFlags{16} = CCMaskFirst;
- let TSFlags{17} = CCMaskLast;
- let TSFlags{18} = IsLogical;
+ let TSFlags{17-14} = CompareZeroCCMask;
+ let TSFlags{18} = CCMaskFirst;
+ let TSFlags{19} = CCMaskLast;
+ let TSFlags{20} = IsLogical;
}
//===----------------------------------------------------------------------===//