| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
We can prove that a 'sub' can be a 'sub nsw' under certain conditions:
- The sign bits of the operands is the same.
- Both operands have more than 1 sign bit.
The subtraction cannot be a signed overflow in either case.
llvm-svn: 216037
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can only propagate the nsw bits if both subtraction instructions are
marked with the appropriate bit.
N.B. We only propagate the nsw bit in InstCombine because the nuw case
is already handled in InstSimplify.
This fixes PR20189.
llvm-svn: 214385
|
|
|
|
|
|
|
| |
The result of x/INT_MIN is either 0 or 1, we can just use an icmp
instead.
llvm-svn: 212167
|
|
|
|
|
|
|
| |
No functional change, just adding more test coverage that was meant to
go in with r212164.
llvm-svn: 212165
|
|
|
|
|
|
|
|
|
| |
It is not safe to negate the smallest signed integer, doing so yields
the same number back.
This fixes PR20186.
llvm-svn: 212164
|
|
|
|
|
|
| |
vectors.
llvm-svn: 199602
|
|
|
|
| |
llvm-svn: 188926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionality change.
This update was done with the following bash script:
find test/Transforms -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc" $NAME; then
TEMP=`mktemp -t temp`
cp $NAME $TEMP
sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
while read FUNC; do
sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP
done
mv $TEMP $NAME
fi
done
llvm-svn: 186268
|
|
|
|
|
|
|
|
|
| |
- Ignore pointer casts.
- Also expand GEPs that aren't constantexprs when they have one use or only constant indices.
- We now compile "&foo[i] - &foo[j]" into "i - j".
llvm-svn: 150961
|
|
|
|
|
|
| |
are either unreduced or only test old syntax.
llvm-svn: 133228
|
|
|
|
|
|
| |
overflow. These subsume some existing equality transforms, so zap those.
llvm-svn: 125843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gep to explicit addressing, we know that none of the intermediate
computation overflows.
This could use review: it seems that the shifts certainly wouldn't
overflow, but could the intermediate adds overflow if there is a
negative index?
Previously the testcase would instcombine to:
define i1 @test(i64 %i) {
%p1.idx.mask = and i64 %i, 4611686018427387903
%cmp = icmp eq i64 %p1.idx.mask, 1000
ret i1 %cmp
}
now we get:
define i1 @test(i64 %i) {
%cmp = icmp eq i64 %i, 1000
ret i1 %cmp
}
llvm-svn: 125271
|
|
|
|
|
|
| |
conversions". :)
llvm-svn: 125265
|
|
|
|
| |
llvm-svn: 119984
|
|
|
|
|
|
| |
use and X is free to negate.
llvm-svn: 94941
|
|
|
|
| |
llvm-svn: 92775
|
|
|
|
|
|
|
|
| |
a constantexpr gep on the 'base' side of the expression.
This completes comment #4 in PR3351, which comes from
483.xalancbmk.
llvm-svn: 92402
|
|
|
|
|
|
| |
expressions. This is a step towards comment #4 in PR3351.
llvm-svn: 92401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to EmitGEPOffset.
Implement some new transforms for optimizing
subtracts of two pointer to ints into the same vector. This happens
for C++ iterator idioms for example, stringmap takes a const char*
that points to the start and end of a string. Once inlined, we want
the pointer difference to turn back into a length.
This is rdar://7362831.
llvm-svn: 86021
|
|
|
|
| |
llvm-svn: 86020
|
|
|
|
| |
llvm-svn: 81257
|
|
|
|
|
|
| |
of using llvm-as, now that opt supports this.
llvm-svn: 81226
|
|
|
|
|
|
|
|
| |
overflowed on negation. This commit checks to make sure that neithe C nor X
overflows. This requires that the RHS of X (a subtract instruction) be a
constant integer.
llvm-svn: 60275
|
|
|
|
|
|
|
| |
~x < ~y --> y < x
-x == -y --> x == y
llvm-svn: 50882
|
|
|
|
| |
llvm-svn: 47793
|
|
|
|
|
|
| |
Upgrade tests to work with new llvm.exp version of llvm_runtest.
llvm-svn: 36013
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.
For PR645:
Make global names use the @ prefix.
For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.
llvm-svn: 33533
|
|
llvm-svn: 33296
|