[PATCH] D116952: [ConstantFolding] Respect denormal handling mode attributes when folding instructions

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 06:38:36 PDT 2022


shchenz added a comment.

In D116952#3618733 <https://reviews.llvm.org/D116952#3618733>, @spatel wrote:

> In D116952#3600716 <https://reviews.llvm.org/D116952#3600716>, @shchenz wrote:
>
>> Hi, this patch causes mis-compile for above case, now `%_res` is true while before this patch it is false. We can not handle the denormal constantFP in fcmp? Will the denormal constantFP be in other opcodes as well?
>
> Catching up after being out for a few days...
> Yes, we'll need to make more of FP constant-folding aware of these function attributes to get consistent results. 
> D128647 <https://reviews.llvm.org/D128647> looks like it will fix fcmp. We'll need something similar for constant-folded FP intrinsics and libcalls too. And there was a comment about updating LangRef to document the behavior (the flushing mode does not affect signbit ops like fneg/fabs/copysign).

Thanks for confirming.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116952/new/

https://reviews.llvm.org/D116952



More information about the llvm-commits mailing list