llvm-project/llvm/test/Transforms/CodeGenPrepare
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
..
AArch64 [CodeGenPrep] Skip merging empty case blocks 2016-12-16 20:38:39 +00:00
AMDGPU AMDGPU: Implement isCheapAddrSpaceCast 2016-12-02 18:12:53 +00:00
ARM [InstCombine] Rewrite bswap/bitreverse handling completely. 2016-01-15 09:20:19 +00:00
NVPTX [BypassSlowDivision] Use ValueTracking to simplify run-time checks 2017-03-02 22:12:15 +00:00
X86 [CGP] Split some critical edges coming out of indirect branches 2017-02-28 00:11:34 +00:00
2008-11-24-RAUW-Self.ll
basic.ll
bitreverse-hang.ll [InstCombine] Rewrite bswap/bitreverse handling completely. 2016-01-15 09:20:19 +00:00
builtin-condition.ll [Analysis] Centralize objectsize lowering logic. 2016-12-20 23:46:36 +00:00
dom-tree.ll Keep CodeGenPrepare from preserving the domtree. 2016-03-22 21:25:08 +00:00
invariant.group.ll Fix CodeGenPrepare::stripInvariantGroupMetadata 2016-12-16 18:52:33 +00:00
overflow-intrinsics.ll
section.ll Update the section.ll to fix non-x86 failure. 2016-10-19 03:53:41 +00:00
skip-merging-case-block.ll [CodeGenPrep] Skip merging empty case blocks 2016-12-16 20:38:39 +00:00
statepoint-relocate.ll [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type 2015-12-26 07:54:32 +00:00