[clang] 9c39663 - Only Remove implicit conversion for the target that support fp16

Tsung Chun Lin via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 10 18:14:24 PST 2019


Hi,

This is a missing fix for
https://reviews.llvm.org/rGcefac9dfaac9c806433ad88cca85bd2f3ba1edad

Jim


Roman Lebedev <lebedev.ri at gmail.com> 於 2019年12月10日 週二 下午7:16寫道:

> Is there a test missing?
>
> On Tue, Dec 10, 2019 at 2:11 PM Jim Lin via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Jim Lin
> > Date: 2019-12-10T19:15:11+08:00
> > New Revision: 9c3966379813c198129c57aa3ebecd68d6af1ebd
> >
> > URL:
> https://github.com/llvm/llvm-project/commit/9c3966379813c198129c57aa3ebecd68d6af1ebd
> > DIFF:
> https://github.com/llvm/llvm-project/commit/9c3966379813c198129c57aa3ebecd68d6af1ebd.diff
> >
> > LOG: Only Remove implicit conversion for the target that support fp16
> >
> > Remove implicit conversion that promotes half to double
> > for the target that support fp16. If the target doesn't
> > support fp16, fp16 will be converted to fp16 intrinsic.
> >
> > Added:
> >
> >
> > Modified:
> >     clang/lib/Sema/SemaChecking.cpp
> >
> > Removed:
> >
> >
> >
> >
> ################################################################################
> > diff  --git a/clang/lib/Sema/SemaChecking.cpp
> b/clang/lib/Sema/SemaChecking.cpp
> > index 2be9effffcec..aff63aef2934 100644
> > --- a/clang/lib/Sema/SemaChecking.cpp
> > +++ b/clang/lib/Sema/SemaChecking.cpp
> > @@ -5822,7 +5822,8 @@ bool Sema::SemaBuiltinFPClassification(CallExpr
> *TheCall, unsigned NumArgs) {
> >              "promotion from float to either float, double, or long
> double is "
> >              "the only expected cast here");
> >          IgnoreCast = true;
> > -      } else if
> (CastArg->getType()->isSpecificBuiltinType(BuiltinType::Half)) {
> > +      } else if
> (CastArg->getType()->isSpecificBuiltinType(BuiltinType::Half) &&
> > +
>  !Context.getTargetInfo().useFP16ConversionIntrinsics()) {
> >          assert(
> >
> (Cast->getType()->isSpecificBuiltinType(BuiltinType::Double) ||
> >               Cast->getType()->isSpecificBuiltinType(BuiltinType::Float)
> ||
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191211/69d58b6a/attachment-0001.html>


More information about the cfe-commits mailing list