[PATCH] D90174: [HIP] Fix regressions due to fp contract change
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 15:47:24 PDT 2020
tra added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:486
+ if (LangOpts.HIP)
+ Options.AllowFPOpFusion = llvm::FPOpFusion::Standard;
+
----------------
yaxunl wrote:
> tra wrote:
> > I don't think it's a good idea to force this.
> >
> > Perhaps a better way to address this would be to set HIP-specific default to Standard where CUDA does it:
> > https://github.com/llvm/llvm-project/blob/master/clang/lib/Frontend/CompilerInvocation.cpp#L2415
> >
> > Currently HIP inherits this setting from CUDA.
> We want to keep -ffp-contract=fast for frontend so that we can continue emitting fmul/fadd insts with contract flag in IR for HIP programs. We only want to change the backend fp fuse option. Currently there is no separate clang option to set backend fp fuse option.
I do not see any references to `AllowFPOpFusion` anywhere under `clang/` other than in this function.
Perhaps I'm missing something. How/where does it make a difference in the front-end other than setting the option for the back-end?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90174/new/
https://reviews.llvm.org/D90174
More information about the cfe-commits
mailing list