summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-08-08 11:31:39 +0000
committerHans Wennborg <hans@hanshq.net>2018-08-08 11:31:39 +0000
commit4eb98069134ed4eae93a42538f6470055e5477d2 (patch)
tree04d01ce0079f5a26fd80bfdb9fdc789aa7e51ba3 /clang/lib/Frontend/CompilerInvocation.cpp
parente5aaa0579f5142b94db7fc4b2342f53e2e26262f (diff)
downloadbcm5719-llvm-4eb98069134ed4eae93a42538f6470055e5477d2.tar.gz
bcm5719-llvm-4eb98069134ed4eae93a42538f6470055e5477d2.zip
Merging r338716:
------------------------------------------------------------------------ r338716 | spatel | 2018-08-02 15:46:20 +0200 (Thu, 02 Aug 2018) | 41 lines [ValueTracking] fix maxnum miscompile for cannotBeOrderedLessThanZero (PR37776) This adds the NAN checks suggested in PR37776: https://bugs.llvm.org/show_bug.cgi?id=37776 If both operands to maxnum are NAN, that should get constant folded, so we don't have to handle that case. This is the same assumption as other FP ops in this function. Returning 'false' is always conservatively correct. Copying from the bug report: Currently, we have this for "when is cannotBeOrderedLessThanZero (mustBePositiveOrNaN) true for maxnum": L ------------------- | Pos | Neg | NaN | ------------------------ |Pos | x | x | x | ------------------------ R |Neg | x | | x | ------------------------ |NaN | x | x | x | ------------------------ The cases with (Neg & NaN) are wrong. We should have: L ------------------- | Pos | Neg | NaN | ------------------------ |Pos | x | x | x | ------------------------ R |Neg | x | | | ------------------------ |NaN | x | | x | ------------------------ Differential Revision: https://reviews.llvm.org/D50081 ------------------------------------------------------------------------ llvm-svn: 339234
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud