forked from OSchip/llvm-project
562272536a
I was surprised to see that we're missing icmp folds based on 'add nsw' in InstCombine, but we should handle the InstSimplify cases first because that could make the InstCombine code simpler. Here are Alive-based proofs for the logic: Name: add_neg_constant Pre: C1 < 0 && (C2 > ((1<<(width(C1)-1)) + C1)) %a = add nsw i7 %x, C1 %b = icmp sgt %a, C2 => %b = false Name: add_pos_constant Pre: C1 > 0 && (C2 < ((1<<(width(C1)-1)) + C1 - 1)) %a = add nsw i6 %x, C1 %b = icmp slt %a, C2 => %b = false Name: nuw Pre: C1 u>= C2 %a = add nuw i11 %x, C1 %b = icmp ult %a, C2 => %b = false Differential Revision: https://reviews.llvm.org/D29053 llvm-svn: 292952 |
||
---|---|---|
.. | ||
2010-12-20-Boolean.ll | ||
2011-01-14-Thread.ll | ||
2011-02-01-Vector.ll | ||
2011-09-05-InsertExtractValue.ll | ||
2011-10-27-BinOpCrash.ll | ||
2011-11-23-MaskedBitsCrash.ll | ||
2013-04-19-ConstantFoldingCrash.ll | ||
AndOrXor.ll | ||
add-mask.ll | ||
and-icmps-same-ops.ll | ||
apint-or.ll | ||
assume.ll | ||
bitcast-vector-fold.ll | ||
bitreverse.ll | ||
bswap.ll | ||
call-callconv.ll | ||
call.ll | ||
cast.ll | ||
compare.ll | ||
dead-code-removal.ll | ||
div.ll | ||
exact-nsw-nuw.ll | ||
fast-math.ll | ||
fdiv.ll | ||
floating-point-arithmetic.ll | ||
floating-point-compare.ll | ||
fold-builtin-fma.ll | ||
gep.ll | ||
icmp-constant.ll | ||
implies.ll | ||
load-relative-32.ll | ||
load-relative.ll | ||
load.ll | ||
maxmin.ll | ||
negate.ll | ||
noalias-ptr.ll | ||
or-icmps-same-ops.ll | ||
past-the-end.ll | ||
phi.ll | ||
pr28725.ll | ||
ptr_diff.ll | ||
reassociate.ll | ||
rem.ll | ||
require-dominator.ll | ||
returned.ll | ||
select.ll | ||
shift-128-kb.ll | ||
shift-knownbits.ll | ||
shr-nop.ll | ||
undef.ll | ||
vec-cmp.ll | ||
vector_gep.ll | ||
vector_ptr_bitcast.ll |