]> granicus.if.org Git - llvm/commit
[SelectionDAG] remove constant folding limitations based on FP exceptions
authorSanjay Patel <spatel@rotateright.com>
Thu, 2 May 2019 14:47:59 +0000 (14:47 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 2 May 2019 14:47:59 +0000 (14:47 +0000)
commit14debde13b44568fbe3fd1a5be49f21e26b455a6
tree549e38ec66d5f1817d56aa57ad98eda1e2a6e525
parent3314e6578bfc33b3d414d2eb38e1ed3702c01d6c
[SelectionDAG] remove constant folding limitations based on FP exceptions

We don't have FP exception limits in the IR constant folder for the binops (apart from strict ops),
so it does not make sense to have them here in the DAG either. Nothing else in the backend tries
to preserve exceptions (again outside of strict ops), so I don't see how this could have ever
worked for real code that cares about FP exceptions.

There are still cases (examples: unary opcodes in SDAG, FMA in IR) where we are trying (at least
partially) to preserve exceptions without even asking if the target supports FP exceptions. Those
should be corrected in subsequent patches.

Real support for FP exceptions requires several changes to handle the constrained/strict FP ops.

Differential Revision: https://reviews.llvm.org/D61331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359791 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/Target/AMDGPU/SIISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
test/CodeGen/AArch64/fp-const-fold.ll