summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/overflow.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+173
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-171-173/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] auto-generate full checks for icmp overflow tests; NFCSanjay Patel2018-12-041-23/+74
| | | | llvm-svn: 348274
* [InstCombine][CodeGenPrep] Create llvm.uadd.with.overflow in CGP.Sanjoy Das2015-04-101-33/+0
| | | | | | | | | | | | | | | | | | | Summary: This change moves creating calls to `llvm.uadd.with.overflow` from InstCombine to CodeGenPrep. Combining overflow check patterns into calls to the said intrinsic in InstCombine inhibits optimization because it introduces an intrinsic call that not all other transforms and analyses understand. Depends on D8888. Reviewers: majnemer, atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8889 llvm-svn: 234638
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | 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
* Add a missing safety check to ProcessUGT_ADDCST_ADD. Fixes PR11438.Eli Friedman2011-11-281-0/+22
| | | | llvm-svn: 145316
* recognize an unsigned add with overflow idiom into uadd.Chris Lattner2010-12-191-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | This resolves a README entry and technically resolves PR4916, but we still get poor code for the testcase in that PR because GVN isn't CSE'ing uadd with add, filed as PR8817. Previously we got: _test7: ## @test7 addq %rsi, %rdi cmpq %rdi, %rsi movl $42, %eax cmovaq %rsi, %rax ret Now we get: _test7: ## @test7 addq %rsi, %rdi movl $42, %eax cmovbq %rsi, %rax ret llvm-svn: 122182
* generalize the sadd creation code to not require that theChris Lattner2010-12-191-4/+27
| | | | | | | | | | | | | | sadd formed is half the size of the original type. We can now compile this into a sadd.i8: unsigned char X(char a, char b) { int res = a+b; if ((unsigned )(res+128) > 255U) abort(); return res; } llvm-svn: 122178
* fix another miscompile in the llvm.sadd formation logic: it wasn't Chris Lattner2010-12-191-1/+22
| | | | | | | | | checking to see if the high bits of the original add result were dead. Inserting a smaller add and zexting back to that size is not good enough. This is likely to be the fix for 8816. llvm-svn: 122177
* fix a bug (possibly 8816) in the sadd forming xform: it isn'tChris Lattner2010-12-191-1/+29
| | | | | | | profitable (or safe) to promote code when the add-with-constant has other uses. llvm-svn: 122175
* Reapply r121905 (automatic synthesis of @llvm.sadd.with.overflow) with a fix ↵Owen Anderson2010-12-171-0/+27
| | | | | | | | | for a bug that manifested itself on the DragonEgg self-host bot. Unfortunately, the testcase is pretty messy and doesn't reduce well due to interactions with other parts of InstCombine. llvm-svn: 122072
* Speculatively revert commit 121905 since it looks like it might have broken theDuncan Sands2010-12-161-27/+0
| | | | | | | | | | | dragonegg self-host buildbot. Original commit message: Add an InstCombine transform to recognize instances of manual overflow-safe addition (performing the addition in a wider type and explicitly checking for overflow), and fold them down to intrinsics. This currently only supports signed-addition, but could be generalized if someone works out the magic constant formulas for other operations. llvm-svn: 121965
* Add an InstCombine transform to recognize instances of manual overflow-safe ↵Owen Anderson2010-12-151-0/+27
addition (performing the addition in a wider type and explicitly checking for overflow), and fold them down to intrinsics. This currently only supports signed-addition, but could be generalized if someone works out the magic constant formulas for other operations. Fixes <rdar://problem/8558713>. llvm-svn: 121905
OpenPOWER on IntegriCloud