OSDN Git Service

InstSimplify: Fold equality comparisons between non-inbounds GEPs.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Sep 2013 14:16:38 +0000 (14:16 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Sep 2013 14:16:38 +0000 (14:16 +0000)
commitbaca5334db904819e6c0d26cd5f5203f82c44f6e
tree5a0d51b9e5de6d2c3e8c316092805f3f8781ce1c
parent9a1aaeb012e593fba977015c5d8b6b1aa41a908c
InstSimplify: Fold equality comparisons between non-inbounds GEPs.

Overflow doesn't affect the correctness of equalities. Computing this is cheap,
we just reuse the computation for the inbounds case and try to peel of more
non-inbounds GEPs. This pattern is unlikely to ever appear in code generated by
Clang, but SCEV occasionally produces it.

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