diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-25 06:08:42 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-25 06:08:42 +0000 |
commit | 732a531506b654a05380d3d155bcf7ebe33b1126 (patch) | |
tree | 75a5fcae54cacc461add7e5f2af71c8c81a44790 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 4844573eb1dda9287e54ee70bc7acf3e238a889b (diff) | |
download | bcm5719-llvm-732a531506b654a05380d3d155bcf7ebe33b1126.tar.gz bcm5719-llvm-732a531506b654a05380d3d155bcf7ebe33b1126.zip |
DAG: Recognize no-signed-zeros-fp-math attribute
clang already emits this with -cl-no-signed-zeros, but codegen
doesn't do anything with it. Treat it like the other fast math
attributes, and change one place to use it.
llvm-svn: 293024
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index ce2e52b7128..dd887a2985b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -635,7 +635,8 @@ static char isNegatibleForFree(SDValue Op, bool LegalOperations, Depth + 1); case ISD::FSUB: // We can't turn -(A-B) into B-A when we honor signed zeros. - if (!Options->UnsafeFPMath && !Op.getNode()->getFlags()->hasNoSignedZeros()) + if (!Options->NoSignedZerosFPMath && + !Op.getNode()->getFlags()->hasNoSignedZeros()) return 0; // fold (fneg (fsub A, B)) -> (fsub B, A) |