llvm-project/llvm/test/Transforms/CodeGenPrepare/NVPTX
Nikolai Bozhenov 4a04fb9e90 [BypassSlowDivision] Use ValueTracking to simplify run-time checks
ValueTracking is used for more thorough analysis of operands. Based on the
analysis, either run-time checks can be simplified (e.g. check only one operand
instead of two) or the transformation can be avoided. For example, it is quite
often the case that a divisor is promoted from a shorter type and run-time
checks for it are redundant.

With additional compile-time analysis of values, two special cases naturally
arise and are addressed by the patch:

 1) Both operands are known to be short enough. Then, the long division can be
    simply replaced with a short one without CFG modification.

 2) If a division is unsigned and the dividend is known to be short then the
    long division is not needed at all. Because if the divisor is too big for
    short division then the quotient is obviously zero (and the remainder is
    equal to the dividend). Actually, the division is not needed when
    (divisor > dividend).

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

llvm-svn: 296832
2017-03-02 22:12:15 +00:00
..
bypass-slow-div-constant-numerator.ll [BypassSlowDivision] Handle division by constant numerators better. 2016-11-16 00:44:47 +00:00
bypass-slow-div-not-exact.ll
bypass-slow-div-special-cases.ll [BypassSlowDivision] Use ValueTracking to simplify run-time checks 2017-03-02 22:12:15 +00:00
bypass-slow-div.ll
dont-sink-nop-addrspacecast.ll [CodeGenPrepare] Don't sink non-cheap addrspacecasts. 2016-11-21 22:49:15 +00:00
lit.local.cfg Add missing lit.local.cfg to llvm/test/Transforms/CodeGenPrepare/NVPTX. 2016-10-28 21:56:07 +00:00