OSDN Git Service

[CVP] Simplify umulo and smulo that cannot overflow
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 16 Apr 2019 20:31:41 +0000 (20:31 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 16 Apr 2019 20:31:41 +0000 (20:31 +0000)
commit28e34c70efb9acd3c5c52e6630ec6cb73ff4b14e
treebe643089114abc4bd44e7c7bb3eac714e325c747
parent981f0db5c18ed1adce25c05429431df8df5e7adc
[CVP] Simplify umulo and smulo that cannot overflow

If a umul.with.overflow or smul.with.overflow operation cannot
overflow, simplify it to a simple mul nuw / mul nsw. After the
refactoring in D60668 this is just a matter of removing an
explicit check against multiplications.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358521 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/overflows.ll