OSDN Git Service

[InstSimplify] fold minnum/maxnum with NaN arg
authorSanjay Patel <spatel@rotateright.com>
Sun, 15 Jul 2018 14:52:16 +0000 (14:52 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 15 Jul 2018 14:52:16 +0000 (14:52 +0000)
commit268055dd8ce8314db0c60557c54db02715d5beec
tree60a655a67115d9b68f97138bbe87ab3a5800a5c7
parent4dd709869f441f8a3ac5909c6b7746f34177e56e
[InstSimplify] fold minnum/maxnum with NaN arg

This fold is repeated/misplaced in instcombine, but I'm
not sure if it's safe to remove that yet because some
other folds appear to be asserting that the transform
has occurred within instcombine itself.

This isn't the best fix for PR37776, but it probably
hides the bug with the given code example:
https://bugs.llvm.org/show_bug.cgi?id=37776

We have another test to demonstrate the more general bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337127 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/floating-point-arithmetic.ll