OSDN Git Service

[InstSimplify] More fcmp cases when comparing against negative constants.
authorFlorian Hahn <florian.hahn@arm.com>
Fri, 1 Dec 2017 12:34:16 +0000 (12:34 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Fri, 1 Dec 2017 12:34:16 +0000 (12:34 +0000)
commit03c5509e661432d177da88af875979881017151a
tree97b7ea93f55a74de3455a7966f957e9bdab9ccae
parent8c4503a35074fd4da13c834ab01ecb65e1d1bb63
[InstSimplify] More fcmp cases when comparing against negative constants.

Summary:
For known positive non-zero value X:
    fcmp uge X, -C => true
    fcmp ugt X, -C => true
    fcmp une X, -C => true
    fcmp oeq X, -C => false
    fcmp ole X, -C => false
    fcmp olt X, -C => false

Patch by Paul Walker.

Reviewers: majnemer, t.p.northover, spatel, RKSimon

Reviewed By: spatel

Subscribers: fhahn, llvm-commits

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

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