OSDN Git Service

[InstSimplify] use any-zero matcher for fcmp folds
authorSanjay Patel <spatel@rotateright.com>
Wed, 20 Feb 2019 14:34:00 +0000 (14:34 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 20 Feb 2019 14:34:00 +0000 (14:34 +0000)
commitdf5eac31e91397efc2637c3bcb52897aadd601e8
treef0459af8245b4062b1605ea72d337413964755e5
parenta2ecb2a90f8d0b7fcca1b9b4c14c2e9fa69105a5
[InstSimplify] use any-zero matcher for fcmp folds

The m_APFloat matcher does not work with anything but strict
splat vector constants, so we could miss these folds and then
trigger an assertion in instcombine:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13201

The previous attempt at this in rL354406 had a logic bug that
actually triggered a regression test failure, but I failed to
notice it the first time.

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