This revision was automatically updated to reflect the committed changes.
Closed by commit rG85d049a089d4: Implement support for option
'fexcess-precision'. (authored by zahiraam).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://re
zahiraam updated this revision to Diff 484882.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/AST/Type.h
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/LangOptions
andrew.w.kaylor accepted this revision.
andrew.w.kaylor added a comment.
This revision is now accepted and ready to land.
With the latest test cases and explanations, I'm happy with this patch.
@rjmccall is there anything else you wanted to see addressed?
CHANGES SINCE LAST ACTION
https://rev
rjmccall added inline comments.
Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89
+// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float
+// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]]
+// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, ptr [[C_
andrew.w.kaylor added inline comments.
Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89
+// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float
+// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]]
+// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, p
zahiraam updated this revision to Diff 483167.
zahiraam marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/AST/Type.h
clang/include/clang/Basic/FPOptions.
pengfei added inline comments.
Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89
+// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float
+// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]]
+// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, ptr [[C_A
andrew.w.kaylor added inline comments.
Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89
+// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float
+// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]]
+// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, p
zahiraam added a comment.
ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zahiraam updated this revision to Diff 480198.
zahiraam edited the summary of this revision.
Herald added subscribers: pcwang-thead, nlopes, abrachet, sstefan1, phosek,
s.egerton, ormris, mstorsjo, simoncook, fedor.sergeev, aheejin, dschuff.
Herald added a reviewer: jdoerfert.
Herald added a revie
aaron.ballman added a reviewer: MaskRay.
aaron.ballman added a comment.
Herald added a subscriber: StephenFan.
Adding @MaskRay for driver-specific expertise.
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:821
+(Precision == LangOptions::ExcessPrecisionKind::FPP_Standard
zahiraam added inline comments.
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:821
+(Precision == LangOptions::ExcessPrecisionKind::FPP_Standard ||
+ Precision == LangOptions::ExcessPrecisionKind::FPP_Fast)) {
if (Ty->isAnyComplexType()) {
zahiraam updated this revision to Diff 479264.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:821
+(Precision == LangOptions::ExcessPrecisionKind::FPP_Standard ||
+ Precision == LangOptions::ExcessPrecisionKind::FPP_Fast)) {
if (Ty->isAnyComplexType()) {
zahiraam marked 2 inline comments as done.
zahiraam added inline comments.
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:821
+(Precision == LangOptions::ExcessPrecisionKind::FPP_Standard ||
+ Precision == LangOptions::ExcessPrecisionKind::FPP_Fast)) {
if (
rjmccall added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.h:301
+ enum Float16ExcessPrecisionKind { FPP_Standard, FPP_Fast, FPP_None };
+
zahiraam wrote:
> rjmccall wrote:
> > rjmccall wrote:
> > > You can leave this named `ExcessPrecis
zahiraam updated this revision to Diff 478738.
zahiraam marked 2 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/L
zahiraam added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.h:301
+ enum Float16ExcessPrecisionKind { FPP_Standard, FPP_Fast, FPP_None };
+
rjmccall wrote:
> rjmccall wrote:
> > You can leave this named `ExcessPrecisionKind` — if we intro
rjmccall added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.h:301
+ enum Float16ExcessPrecisionKind { FPP_Standard, FPP_Fast, FPP_None };
+
rjmccall wrote:
> You can leave this named `ExcessPrecisionKind` — if we introduce excess
> preci
zahiraam added a comment.
@rjmccall Would you mind looking at this please? Thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
zahiraam updated this revision to Diff 477179.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/
zahiraam added inline comments.
Comment at: clang/docs/UsersManual.rst:1732
+.. option:: -fexcess-precision:
+
+ By default, Clang uses excess precision to calculate ``_Float16``
rjmccall wrote:
>
>The C and C++ standards allow floating-point expressions t
zahiraam updated this revision to Diff 476913.
zahiraam marked 6 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/L
rjmccall added a comment.
At some point, we're going to have to figure out how this impacts
`FLT_EVAL_METHOD`, but we can do that in a separate patch.
Comment at: clang/docs/UsersManual.rst:1732
+.. option:: -fexcess-precision:
+
+ By default, Clang uses excess precision to
zahiraam updated this revision to Diff 476587.
zahiraam marked 2 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/docs/UsersManual.rst
clang/include/clang/Basic/FPOptions.def
clang/include/clang/Basic/L
rjmccall added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.def:320
BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 2, FEM_UnsetOnCommandLine,
"FP type used for floating point arithmetic")
+BENIGN_ENUM_LANGOPT(FPPrecisionMode, FPExcessPrecisionModeKind
zahiraam added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.h:300
+FPP_Fast,
+FPP_None
+ };
zahiraam wrote:
> andrew.w.kaylor wrote:
> > Is FPP_None somehow the same as fexcess-precision=16? If not, what does it
> > mean?
> Yes, ma
zahiraam updated this revision to Diff 476161.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/LangOptions.h
clang/include/clang/Driver/Options.td
clang/lib/CodeG
zahiraam added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.h:300
+FPP_Fast,
+FPP_None
+ };
andrew.w.kaylor wrote:
> Is FPP_None somehow the same as fexcess-precision=16? If not, what does it
> mean?
Yes, maybe this is confusing.
zahiraam updated this revision to Diff 475902.
zahiraam marked 5 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
Files:
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/LangOptions.h
clang/includ
andrew.w.kaylor added a comment.
Can you update the clang user's manual to describe the behavior of this option?
The excess precision issue is also mentioned in the clang language extensions
document
(https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point).
===
zahiraam added a comment.
@rjmccall Would you mind looking at this when you have a moment? Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136176/new/
https://reviews.llvm.org/D136176
___
cfe-commi
32 matches
Mail list logo