This revision was automatically updated to reflect the committed changes.
Closed by commit rL320215: [CodeGen][X86] Fix handling of __fp16 vectors.
(authored by ahatanak).
Changed prior to commit:
https://reviews.llvm.org/D40112?vs=123100&id=126229#toc
Repository:
rL LLVM
https://reviews.ll
This revision was automatically updated to reflect the committed changes.
Closed by commit rC320215: [CodeGen][X86] Fix handling of __fp16 vectors.
(authored by ahatanak).
Changed prior to commit:
https://reviews.llvm.org/D40112?vs=123100&id=126228#toc
Repository:
rC Clang
https://reviews.l
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
LGTM with the minor comment below.
Comment at: include/clang/Basic/TargetInfo.h:563
+ /// Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used
+ /// to c
ahatanak added a comment.
Any other comments from anyone?
https://reviews.llvm.org/D40112
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:954
if (DstTy->isFloatingPointTy()) {
- if (!CGF.getContext().getLangOpts().HalfArgsAndReturns)
+ if (CGF.getContext().getTargetInfo().useFP16ConversionIntrinsics())
return Builder.Cr
bruno added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:954
if (DstTy->isFloatingPointTy()) {
- if (!CGF.getContext().getLangOpts().HalfArgsAndReturns)
+ if (CGF.getContext().getTargetInfo().useFP16ConversionIntrinsics())
return Builder.Creat
ahatanak created this revision.
Herald added a subscriber: javed.absar.
IRGen for __fp16 vectors on X86 is currently completely broken. For example
when the following code is compiled:
half4 hv0, hv1, hv2; // these are vectors of __fp16.
void foo221() {
hv0 = hv1 + hv2;
}
clang gen