diff options
Diffstat (limited to 'llvm/include/llvm/CodeGen/ISDOpcodes.h')
-rw-r--r-- | llvm/include/llvm/CodeGen/ISDOpcodes.h | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h index 658ad31fa2a6..06140fae8790 100644 --- a/llvm/include/llvm/CodeGen/ISDOpcodes.h +++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h @@ -13,6 +13,8 @@ #ifndef LLVM_CODEGEN_ISDOPCODES_H #define LLVM_CODEGEN_ISDOPCODES_H +#include "llvm/CodeGen/ValueTypes.h" + namespace llvm { /// ISD namespace - This namespace contains an enum which represents all of the @@ -283,6 +285,12 @@ namespace ISD { /// bits of the first 2 operands. SMULFIXSAT, UMULFIXSAT, + /// RESULT = [US]DIVFIX(LHS, RHS, SCALE) - Perform fixed point division on + /// 2 integers with the same width and scale. SCALE represents the scale + /// of both operands as fixed point numbers. This SCALE parameter must be a + /// constant integer. + SDIVFIX, UDIVFIX, + /// Simple binary floating point operators. FADD, FSUB, FMUL, FDIV, FREM, @@ -302,6 +310,7 @@ namespace ISD { STRICT_FRINT, STRICT_FNEARBYINT, STRICT_FMAXNUM, STRICT_FMINNUM, STRICT_FCEIL, STRICT_FFLOOR, STRICT_FROUND, STRICT_FTRUNC, STRICT_LROUND, STRICT_LLROUND, STRICT_LRINT, STRICT_LLRINT, + STRICT_FMAXIMUM, STRICT_FMINIMUM, /// STRICT_FP_TO_[US]INT - Convert a floating point value to a signed or /// unsigned integer. These have the same semantics as fptosi and fptoui @@ -310,6 +319,13 @@ namespace ISD { STRICT_FP_TO_SINT, STRICT_FP_TO_UINT, + /// STRICT_[US]INT_TO_FP - Convert a signed or unsigned integer to + /// a floating point value. These have the same semantics as sitofp and + /// uitofp in IR. + /// They are used to limit optimizations while the DAG is being optimized. + STRICT_SINT_TO_FP, + STRICT_UINT_TO_FP, + /// X = STRICT_FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating /// point type down to the precision of the destination VT. TRUNC is a /// flag, which is always an integer that is zero or one. If TRUNC is 0, @@ -330,6 +346,12 @@ namespace ISD { /// It is used to limit optimizations while the DAG is being optimized. STRICT_FP_EXTEND, + /// STRICT_FSETCC/STRICT_FSETCCS - Constrained versions of SETCC, used + /// for floating-point operands only. STRICT_FSETCC performs a quiet + /// comparison operation, while STRICT_FSETCCS performs a signaling + /// comparison operation. + STRICT_FSETCC, STRICT_FSETCCS, + /// FMA - Perform a * b + c with no intermediate rounding step. FMA, @@ -921,11 +943,16 @@ namespace ISD { BUILTIN_OP_END }; + /// FIRST_TARGET_STRICTFP_OPCODE - Target-specific pre-isel operations + /// which cannot raise FP exceptions should be less than this value. + /// Those that do must not be less than this value. + static const int FIRST_TARGET_STRICTFP_OPCODE = BUILTIN_OP_END+400; + /// FIRST_TARGET_MEMORY_OPCODE - Target-specific pre-isel operations /// which do not reference a specific memory location should be less than /// this value. Those that do must not be less than this value, and can /// be used with SelectionDAG::getMemIntrinsicNode. - static const int FIRST_TARGET_MEMORY_OPCODE = BUILTIN_OP_END+400; + static const int FIRST_TARGET_MEMORY_OPCODE = BUILTIN_OP_END+500; //===--------------------------------------------------------------------===// /// MemIndexedMode enum - This enum defines the load / store indexed @@ -1076,7 +1103,17 @@ namespace ISD { /// Return the operation corresponding to !(X op Y), where 'op' is a valid /// SetCC operation. - CondCode getSetCCInverse(CondCode Operation, bool isInteger); + CondCode getSetCCInverse(CondCode Operation, EVT Type); + + namespace GlobalISel { + /// Return the operation corresponding to !(X op Y), where 'op' is a valid + /// SetCC operation. The U bit of the condition code has different meanings + /// between floating point and integer comparisons and LLT's don't provide + /// this distinction. As such we need to be told whether the comparison is + /// floating point or integer-like. Pointers should use integer-like + /// comparisons. + CondCode getSetCCInverse(CondCode Operation, bool isIntegerLike); + } // end namespace GlobalISel /// Return the operation corresponding to (Y op X) when given the operation /// for (X op Y). @@ -1085,12 +1122,12 @@ namespace ISD { /// Return the result of a logical OR between different comparisons of /// identical values: ((X op1 Y) | (X op2 Y)). This function returns /// SETCC_INVALID if it is not possible to represent the resultant comparison. - CondCode getSetCCOrOperation(CondCode Op1, CondCode Op2, bool isInteger); + CondCode getSetCCOrOperation(CondCode Op1, CondCode Op2, EVT Type); /// Return the result of a logical AND between different comparisons of /// identical values: ((X op1 Y) & (X op2 Y)). This function returns /// SETCC_INVALID if it is not possible to represent the resultant comparison. - CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, bool isInteger); + CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, EVT Type); } // end llvm::ISD namespace |