| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The reversion apparently deleted the test/Transforms directory.
Will be re-reverting again.
llvm-svn: 358552
|
|
|
|
|
|
|
|
| |
As it's causing some bot failures (and per request from kbarton).
This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda.
llvm-svn: 358546
|
|
|
|
|
|
|
|
|
| |
And regenerate checks. I had to rename some variables, because
update_test_checks can't deal with the same variable names used
in lower and upper case. I've also dropped the result type aliases,
as just using the type directly gives a cleaner result.
llvm-svn: 354759
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking whether a number has a certain number of trailing / leading
zeros means checking whether it is of the form XXXX1000 / 0001XXXX,
which can be done with an and+icmp.
Related to https://bugs.llvm.org/show_bug.cgi?id=28668. As a next
step, this can be extended to non-equality predicates.
Differential Revision: https://reviews.llvm.org/D55745
llvm-svn: 349530
|
|
|
|
|
|
|
| |
Tests checking for the addition of !range metadata should be
preserved if cttz/ctlz + icmp is optimized.
llvm-svn: 349318
|
|
|
|
|
|
|
|
| |
This reverts commit r349311.
Didn't check this carefully enough...
llvm-svn: 349312
|
|
|
|
| |
llvm-svn: 349311
|
|
|
|
| |
llvm-svn: 321572
|
|
|
|
| |
llvm-svn: 321468
|
|
|
|
| |
llvm-svn: 318006
|
|
|
|
| |
llvm-svn: 307022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
known bits
Summary:
I noticed that passing known bits across these intrinsics isn't great at capturing the information we really know. Turning known bits of the input into known bits of a count output isn't able to convey a lot of what we really know.
This patch adds range metadata to these intrinsics based on the known bits.
Currently the patch punts if we already have range metadata present.
Reviewers: spatel, RKSimon, davide, majnemer
Reviewed By: RKSimon
Subscribers: sanjoy, hfinkel, llvm-commits
Differential Revision: https://reviews.llvm.org/D32582
llvm-svn: 305927
|
|
|
|
|
|
| |
known bits.
llvm-svn: 304669
|
|
|
|
|
|
| |
to understand that the second argument is still a scalar.
llvm-svn: 304668
|
|
|
|
|
|
| |
some showing missed optimizations. NFC
llvm-svn: 304667
|
|
|
|
|
|
| |
like a copy paste mistake.
llvm-svn: 304666
|
|
|
|
|
|
| |
instructions after cttz/ctlz/ctpop where some bits of the input is known.
llvm-svn: 304224
|
|
|
|
|
|
|
|
|
|
| |
ctlz/cttz intrinics
This patch uses KnownOnes of the input of ctlz/cttz to bound the value that can be returned from these intrinsics. This makes these intrinsics more similar to the handling for ctpop which already uses known bits to produce a similar bound.
Differential Revision: https://reviews.llvm.org/D32521
llvm-svn: 302444
|
|
|
|
|
|
| |
No change in which intrinsics should be speculated.
llvm-svn: 301995
|
|
|
|
|
|
| |
for cttz and ctlz intrinsics.
llvm-svn: 301385
|
|
|
|
| |
llvm-svn: 291970
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Also add popcount(n) == bitsize(n) -> n == -1 transformation.
Reviewers: majnemer, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23134
llvm-svn: 279141
|
|
|
|
| |
llvm-svn: 277819
|
|
|
|
| |
llvm-svn: 277695
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: As per title.
Reviewers: majnemer, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23139
llvm-svn: 277694
|
|
|
|
| |
llvm-svn: 276523
|
|
|
|
| |
llvm-svn: 276451
|
|
|
|
|
|
|
|
| |
A patch by Chakshu Grover!
This patch allows constfolding of trunc,rint,nearbyint,ceil and floor intrinsics using APFloat class.
Differential Revision: http://reviews.llvm.org/D11144
llvm-svn: 242763
|
|
|
|
|
|
|
|
| |
This patch const folds llvm.sin.* and llvm.cos.* intrinsics whenever feasible.
Differential Revision: http://reviews.llvm.org/D10836
llvm-svn: 241665
|
|
|
|
|
|
|
|
|
| |
This change does a few things:
- Move some InstCombine transforms to InstSimplify
- Run SimplifyCall from within InstCombine::visitCallInst
- Teach InstSimplify to fold [us]mul_with_overflow(X, undef) to 0.
llvm-svn: 237995
|
|
|
|
|
|
|
|
|
| |
A refactoring made @llvm.ssub.with.overflow.i32(i32 %X, i32 0) transform
into undef instead of %X.
This fixes PR23624.
llvm-svn: 237968
|
|
|
|
| |
llvm-svn: 234780
|
|
|
|
|
|
| |
This optimization a continuation of r231140 that reasoned about signed div.
llvm-svn: 231433
|
|
|
|
|
|
|
| |
http://reviews.llvm.org/D8028
rdar://20023136
llvm-svn: 231140
|
|
|
|
|
|
|
|
|
|
|
| |
'is_zero_undef' flag.
This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by
a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared.
Added test InstCombine/select-cmp-cttz-ctlz.ll.
llvm-svn: 227197
|
|
|
|
|
|
|
| |
We know overflow always occurs if both ~LHSKnownZero * ~RHSKnownZero
and LHSKnownOne * RHSKnownOne overflow.
llvm-svn: 225077
|
|
|
|
|
|
|
| |
A multiply cannot unsigned wrap if there are bitwidth, or more, leading
zero bits between the two operands.
llvm-svn: 224849
|
|
|
|
|
|
|
|
|
|
| |
if possible.
Some intrinsics, like s/uadd.with.overflow and umul.with.overflow, are already strength reduced.
This change adds other arithmetic intrinsics: s/usub.with.overflow, smul.with.overflow.
It completes the work on PR20194.
llvm-svn: 224417
|
|
|
|
|
|
|
|
| |
can prove that it cannot overflow.
PR20194
llvm-svn: 212331
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
included."
This reverts commit 3854a5d90fee52af1065edbed34521fff6cdc18d.
This causes a clang unit test to hang: vtable-available-externally.cpp.
llvm-svn: 174692
|
|
|
|
| |
llvm-svn: 174675
|
|
|
|
|
|
|
|
|
|
| |
We use constant folding to see if an intrinsic evaluates to the same value as a
constant that we know. If we don't take the undefinedness into account we get a
value that doesn't match the actual implementation, and miscompiled code.
This was uncovered by Chandler's simplifycfg changes.
llvm-svn: 173356
|
|
|
|
|
|
|
|
|
|
| |
ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.
My previous regex was not good enough to find these.
llvm-svn: 171343
|
|
|
|
|
|
| |
This is a result of Benjamin's work on ValueTracking.
llvm-svn: 147259
|
|
|
|
|
|
|
|
|
| |
undef zero.
unsigned foo(unsigned x) { return 31 - __builtin_clz(x); }
now compiles into a single "bsrl" instruction on x86.
llvm-svn: 147255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I followed three heuristics for deciding whether to set 'true' or
'false':
- Everything target independent got 'true' as that is the expected
common output of the GCC builtins.
- If the target arch only has one way of implementing this operation,
set the flag in the way that exercises the most of codegen. For most
architectures this is also the likely path from a GCC builtin, with
'true' being set. It will (eventually) require lowering away that
difference, and then lowering to the architecture's operation.
- Otherwise, set the flag differently dependending on which target
operation should be tested.
Let me know if anyone has any issue with this pattern or would like
specific tests of another form. This should allow the x86 codegen to
just iteratively improve as I teach the backend how to differentiate
between the two forms, and everything else should remain exactly the
same.
llvm-svn: 146370
|
|
|
|
|
|
| |
instead of 'volatile load', which is archaic.
llvm-svn: 145171
|
|
|
|
|
|
|
|
|
|
| |
of the instruction.
Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.
llvm-svn: 137527
|
|
|
|
|
|
|
|
| |
been
needed since llvm-gcc 3.4 days.
llvm-svn: 133248
|