[PATCH] D116952: [ConstantFolding] Flush folded denormals to zero when using fastmath

David Candler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 08:30:20 PST 2022


dcandler updated this revision to Diff 403669.
dcandler added a comment.

Ping for any other comments.

I've also added the suggested comment in the code. And yes, one result of this patch would indeed be that calls to constant folding from passes other than instruction combining would not be able to fold floating point instructions that result in a denormal - since they lack TTI. While it would be possible to add TTI to those passes, that becomes a significantly larger change and I was unsure how necessary that would be if instruction combining can already handle this case.


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

https://reviews.llvm.org/D116952

Files:
  llvm/include/llvm/Analysis/ConstantFolding.h
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/AArch64/constant-fold-fp-denormal.ll
  llvm/test/Transforms/InstCombine/ARM/constant-fold-fp-denormal.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116952.403669.patch
Type: text/x-patch
Size: 17206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/36cef023/attachment.bin>


More information about the llvm-commits mailing list