OSDN Git Service

[SimplifyIndVar] Refactor overflow check elimination code; NFC
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 1 Jun 2019 20:21:53 +0000 (20:21 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 1 Jun 2019 20:21:53 +0000 (20:21 +0000)
commit120bc73a3a0c0cafa548215e48db912e02d51ded
tree58c50da71763622cfcbb904cd611ccda2581610a
parent1f535d6428798057a2ce338aec034115c79be49e
[SimplifyIndVar] Refactor overflow check elimination code; NFC

Extract a willNotOverflow() helper function that is shared between
eliminateOverflowIntrinsic() and strengthenOverflowingOperation().
Use WithOverflowInst for the former.

We'll be able to reuse the same code for saturating intrinsics as
well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362305 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyIndVar.cpp