static LLVMType getDoubleTy(LLVMDialect *dialect);
static LLVMType getFloatTy(LLVMDialect *dialect);
static LLVMType getHalfTy(LLVMDialect *dialect);
+ static LLVMType getFP128Ty(LLVMDialect *dialect);
+ static LLVMType getX86_FP80Ty(LLVMDialect *dialect);
/// Utilities used to generate integer types.
static LLVMType getIntNTy(LLVMDialect *dialect, unsigned numBits);
/// A set of LLVMTypes that are cached on construction to avoid any lookups or
/// locking.
LLVMType int1Ty, int8Ty, int16Ty, int32Ty, int64Ty, int128Ty;
- LLVMType doubleTy, floatTy, halfTy;
+ LLVMType doubleTy, floatTy, halfTy, fp128Ty, x86_fp80Ty;
LLVMType voidTy;
/// A smart mutex to lock access to the llvm context. Unlike MLIR, LLVM is not
impl->doubleTy = LLVMType::get(context, llvm::Type::getDoubleTy(llvmContext));
impl->floatTy = LLVMType::get(context, llvm::Type::getFloatTy(llvmContext));
impl->halfTy = LLVMType::get(context, llvm::Type::getHalfTy(llvmContext));
+ impl->fp128Ty = LLVMType::get(context, llvm::Type::getFP128Ty(llvmContext));
+ impl->x86_fp80Ty =
+ LLVMType::get(context, llvm::Type::getX86_FP80Ty(llvmContext));
/// Other Types.
impl->voidTy = LLVMType::get(context, llvm::Type::getVoidTy(llvmContext));
}
LLVMType LLVMType::getHalfTy(LLVMDialect *dialect) {
return dialect->impl->halfTy;
}
+LLVMType LLVMType::getFP128Ty(LLVMDialect *dialect) {
+ return dialect->impl->fp128Ty;
+}
+LLVMType LLVMType::getX86_FP80Ty(LLVMDialect *dialect) {
+ return dialect->impl->x86_fp80Ty;
+}
/// Utilities used to generate integer types.
LLVMType LLVMType::getIntNTy(LLVMDialect *dialect, unsigned numBits) {
%25 = llvm.inttoptr %arg0 : !llvm.i32 to !llvm<"i32*">
%26 = llvm.ptrtoint %25 : !llvm<"i32*"> to !llvm.i32
+// Extended and Quad floating point
+//
+// CHECK: %27 = llvm.fpext %arg1 : !llvm.float to !llvm<"x86_fp80">
+// CHECK-NEXT: %28 = llvm.fpext %arg1 : !llvm.float to !llvm.fp128
+ %27 = llvm.fpext %arg1 : !llvm.float to !llvm<"x86_fp80">
+ %28 = llvm.fpext %arg1 : !llvm.float to !llvm.fp128
+
// CHECK: llvm.return
llvm.return
}