[clang] clang: Remove useFP16ConversionIntrinsics target option (PR #207212)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 08:03:06 PDT 2026
================
@@ -1304,18 +1304,10 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &value,
return cir::IntAttr::get(ty, value.getInt());
}
case APValue::Float: {
- const llvm::APFloat &init = value.getFloat();
- if (&init.getSemantics() == &llvm::APFloat::IEEEhalf() &&
- !cgm.getASTContext().getLangOpts().NativeHalfType &&
- cgm.getASTContext().getTargetInfo().useFP16ConversionIntrinsics()) {
- cgm.errorNYI("ConstExprEmitter::tryEmitPrivate half");
- return {};
- }
-
mlir::Type ty = cgm.convertType(destType);
assert(mlir::isa<cir::FPTypeInterface>(ty) &&
"expected floating-point type");
- return cir::FPAttr::get(ty, init);
+ return cir::FPAttr::get(ty, value.getFloat());
----------------
arsenm wrote:
That really ought to have been in the patch that ported this code in the first place. I've added some basic testing, but the ABI coercion seems to mostly be missing on the CIR path so I left that alone
https://github.com/llvm/llvm-project/pull/207212
More information about the cfe-commits
mailing list