[clang] clang: Remove useFP16ConversionIntrinsics target option (PR #207212)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 08:07:29 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());
----------------
erichkeane wrote:
If you see, the previous behavior was NYI, which is why it isn't tested. But by removing NYI, you're making a bit of a guarantee that we're handling this right. So getting spot-checks for these is pretty important.
https://github.com/llvm/llvm-project/pull/207212
More information about the cfe-commits
mailing list