summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/intrinsics.ll
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper ↵Benjamin Kramer2011-05-211-21/+0
| | | | | | | | add.with.overflow(X, X)" It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X". llvm-svn: 131798
* InstCombine: Turn mul.with.overflow(X, 2) into the cheaper ↵Benjamin Kramer2011-05-211-0/+21
| | | | | | add.with.overflow(X, X) llvm-svn: 131789
* More instcombine cleanup aimed towards improving debug line info.Eli Friedman2011-05-181-4/+4
| | | | llvm-svn: 131559
* InstCombine: Turn umul_with_overflow into mul nuw if we can prove that it ↵Benjamin Kramer2011-03-101-0/+27
| | | | | | | | | | cannot overflow. This happens a lot in clang-compiled C++ code because it adds overflow checks to operator new[]: unsigned *foo(unsigned n) { return new unsigned[n]; } We can optimize away the overflow check on 64 bit targets because (uint64_t)n*4 cannot overflow. llvm-svn: 127418
* X86 supports i8/i16 overflow ops (except i8 multiplies), we shouldChris Lattner2010-12-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generate them. Now we compile: define zeroext i8 @X(i8 signext %a, i8 signext %b) nounwind ssp { entry: %0 = tail call %0 @llvm.sadd.with.overflow.i8(i8 %a, i8 %b) %cmp = extractvalue %0 %0, 1 br i1 %cmp, label %if.then, label %if.end into: _X: ## @X ## BB#0: ## %entry subl $12, %esp movb 16(%esp), %al addb 20(%esp), %al jo LBB0_2 Before we were generating: _X: ## @X ## BB#0: ## %entry pushl %ebp movl %esp, %ebp subl $8, %esp movb 12(%ebp), %al testb %al, %al setge %cl movb 8(%ebp), %dl testb %dl, %dl setge %ah cmpb %cl, %ah sete %cl addb %al, %dl testb %dl, %dl setge %al cmpb %al, %ah setne %al andb %cl, %al testb %al, %al jne LBB0_2 llvm-svn: 122186
* optimize uadd(x, cst) into a comparison when the normal Chris Lattner2010-12-191-0/+10
| | | | | | | result is dead. This is required for my next patch to not regress the testsuite. llvm-svn: 122181
* PR7853: fix a silly mistake introduced in r101899, and add a test to make sureEli Friedman2010-08-091-12/+22
| | | | | | it doesn't regress again. llvm-svn: 110597
* implement a simple instcombine xform that has been in theChris Lattner2010-01-231-0/+15
| | | | | | readme forever. llvm-svn: 94318
* optimize comparisons against cttz/ctlz/ctpop, patch by Alastair Lynn!Chris Lattner2010-01-051-4/+26
| | | | llvm-svn: 92745
* optimize cttz and ctlz when we can prove something about the Chris Lattner2010-01-051-1/+24
| | | | | | leading/trailing bits. Patch by Alastair Lynn! llvm-svn: 92706
* add a few trivial instcombines for llvm.powi.Chris Lattner2010-01-011-0/+22
| | | | llvm-svn: 92383
* add testcases for the foo_with_overflow op xforms added recently andChris Lattner2009-11-291-3/+70
| | | | | | fix bugs exposed by the tests. Testcases from Alastair Lynn! llvm-svn: 90056
* if a 'with overflow' intrinsic just has the normal result used, simplifyChris Lattner2009-11-091-0/+12
it to a normal binop. Patch by Alastair Lynn, testcase by me. llvm-svn: 86524
OpenPOWER on IntegriCloud