zahiraam added inline comments.
================ Comment at: clang/include/clang/Basic/FPOptions.def:30 OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool, 1, BFloat16ExcessPrecision) #undef OPTION ---------------- andrew.w.kaylor wrote: > Does this mean MathErrno is tracked in both LangOpts and FPOptions? Yes. So that we can check that if it's overridden by a pragma or an attribute. I don't see another way. ================ Comment at: clang/test/CodeGen/math-errno.c:33 + +__attribute__((optnone)) +float f4(float x) { ---------------- andrew.w.kaylor wrote: > Can you add a runline with -O0. That should prevent all instances of the > intrinsics, right? Yes. ================ Comment at: clang/test/CodeGen/math-errno.c:49 +// FAST-LABEL: define dso_local nofpclass(nan inf) float @f4(float noundef nofpclass(nan inf) {{.*}}) +// FAST: call reassoc nnan ninf nsz arcp afn nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan inf) %0) #[[ATTR0:[0-9]+]] + ---------------- andrew.w.kaylor wrote: > I think the 'afn' flag here is a problem. The backend has no concept of > errno, so 'afn' will be treated as allowing the function to be replaced. Added all the commands that are triggered by fast-math in the RUN line command. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits