forked from OSchip/llvm-project
[flang] Use descriptors for real/complex input other than kinds 4 and 8
This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, vdonaldson Differential Revision: https://reviews.llvm.org/D128502 Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
This commit is contained in:
parent
4965cea2f3
commit
575eb2133b
|
@ -530,17 +530,17 @@ static mlir::func::FuncOp getInputFunc(mlir::Location loc,
|
|||
? getIORuntimeFunc<mkIOKey(InputLogical)>(loc, builder)
|
||||
: getIORuntimeFunc<mkIOKey(InputInteger)>(loc, builder);
|
||||
if (auto ty = type.dyn_cast<mlir::FloatType>()) {
|
||||
if (auto width = ty.getWidth(); width <= 32)
|
||||
if (auto width = ty.getWidth(); width == 32)
|
||||
return getIORuntimeFunc<mkIOKey(InputReal32)>(loc, builder);
|
||||
else if (width <= 64)
|
||||
else if (width == 64)
|
||||
return getIORuntimeFunc<mkIOKey(InputReal64)>(loc, builder);
|
||||
}
|
||||
auto kindMap = fir::getKindMapping(builder.getModule());
|
||||
if (auto ty = type.dyn_cast<fir::ComplexType>()) {
|
||||
auto width = kindMap.getRealBitsize(ty.getFKind());
|
||||
if (width <= 32)
|
||||
if (width == 32)
|
||||
return getIORuntimeFunc<mkIOKey(InputComplex32)>(loc, builder);
|
||||
else if (width <= 64)
|
||||
else if (width == 64)
|
||||
return getIORuntimeFunc<mkIOKey(InputComplex64)>(loc, builder);
|
||||
}
|
||||
if (type.isa<fir::LogicalType>())
|
||||
|
|
Loading…
Reference in New Issue