forked from OSchip/llvm-project
[mlir] expand the legal floating-point types in the LLVM IR dialect type check
This patch adds a couple missing LLVM IR dialect floating point types to the legality check. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D89350
This commit is contained in:
parent
d38277dbcf
commit
3ea4ccd857
|
@ -80,7 +80,9 @@ def LLVM_AnyFloat : Type<
|
|||
CPred<"$_self.isa<::mlir::LLVM::LLVMBFloatType, "
|
||||
"::mlir::LLVM::LLVMHalfType, "
|
||||
"::mlir::LLVM::LLVMFloatType, "
|
||||
"::mlir::LLVM::LLVMDoubleType>()">,
|
||||
"::mlir::LLVM::LLVMDoubleType, "
|
||||
"::mlir::LLVM::LLVMFP128Type, "
|
||||
"::mlir::LLVM::LLVMX86FP80Type>()">,
|
||||
"floating point LLVM type">;
|
||||
|
||||
// Type constraint accepting any LLVM pointer type.
|
||||
|
|
|
@ -41,6 +41,8 @@ class LLVMBFloatType;
|
|||
class LLVMHalfType;
|
||||
class LLVMFloatType;
|
||||
class LLVMDoubleType;
|
||||
class LLVMFP128Type;
|
||||
class LLVMX86FP80Type;
|
||||
class LLVMIntegerType;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -89,9 +91,12 @@ public:
|
|||
bool isHalfTy() { return isa<LLVMHalfType>(); }
|
||||
bool isFloatTy() { return isa<LLVMFloatType>(); }
|
||||
bool isDoubleTy() { return isa<LLVMDoubleType>(); }
|
||||
bool isFP128Ty() { return isa<LLVMFP128Type>(); }
|
||||
bool isX86_FP80Ty() { return isa<LLVMX86FP80Type>(); }
|
||||
bool isFloatingPointTy() {
|
||||
return isa<LLVMHalfType>() || isa<LLVMBFloatType>() ||
|
||||
isa<LLVMFloatType>() || isa<LLVMDoubleType>();
|
||||
isa<LLVMFloatType>() || isa<LLVMDoubleType>() ||
|
||||
isa<LLVMFP128Type>() || isa<LLVMX86FP80Type>();
|
||||
}
|
||||
|
||||
/// Array type utilities.
|
||||
|
|
Loading…
Reference in New Issue