diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2013-06-29 08:40:07 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2013-06-29 08:40:07 +0000 |
| commit | f723e5d1c290a00378d3fc10c7ef502692e0710e (patch) | |
| tree | d3a72dc5525fcdedce45406dafb31d0d8962cf91 /lib/Bitcode/Reader | |
| parent | d4a9ebc7341a1ed066fcdff8e7e4e9cbf1bc4368 (diff) | |
| download | llvm-f723e5d1c290a00378d3fc10c7ef502692e0710e.tar.gz llvm-f723e5d1c290a00378d3fc10c7ef502692e0710e.tar.bz2 llvm-f723e5d1c290a00378d3fc10c7ef502692e0710e.tar.xz | |
InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms
Real world code sometimes has the denominator of a 'udiv' be a
'select'. LLVM can handle such cases but only when the 'select'
operands are symmetric in structure (both select operands are a constant
power of two or a left shift, etc.). This falls apart if we are dealt a
'udiv' where the code is not symetric or if the select operands lead us
to more select instructions.
Instead, we should treat the LHS and each select operand as a distinct
divide operation and try to optimize them independently. If we can
to simplify each operation, then we can replace the 'udiv' with, say, a
'lshr' that has a new select with a bunch of new operands for the
select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
0 files changed, 0 insertions, 0 deletions
