summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/udivrem-change-width.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+288
| | | | | | | | 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-288/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] fix and enhance udiv/urem narrowingSanjay Patel2017-08-241-20/+31
| | | | | | | | | | | | | | There are 3 small independent changes here: 1. Account for multiple uses in the pattern matching: avoid the transform if it increases the instruction count. 2. Add a missing fold for the case where the numerator is the constant: http://rise4fun.com/Alive/E2p 3. Enable all folds for vector types. There's still one more potential change - use "shouldChangeType()" to keep from transforming to an illegal integer type. Differential Revision: https://reviews.llvm.org/D36988 llvm-svn: 311726
* [InstCombine] add udiv/urem tests with constant numerator; NFCSanjay Patel2017-08-211-0/+22
| | | | llvm-svn: 311396
* [InstCombine] add more tests for udiv/urem narrowing; NFCSanjay Patel2017-08-211-59/+169
| | | | | | We don't currently limit these folds with hasOneUse() or shouldChangeType(). llvm-svn: 311390
* [InstCombine] add vector tests; NFCSanjay Patel2017-08-211-0/+70
| | | | llvm-svn: 311339
* [InstCombine] regenerate test checks; NFCSanjay Patel2017-08-211-40/+53
| | | | llvm-svn: 311337
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* InstCombine: Turn (zext A) udiv (zext B) into (zext (A udiv B)). Same for ↵Benjamin Kramer2011-04-301-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | urem or constant B. This obviously helps a lot if the division would be turned into a libcall (think i64 udiv on i386), but div is also one of the few remaining instructions on modern CPUs that become more expensive when the bitwidth gets bigger. This also helps register pressure on i386 when dividing chars, divb needs two 8-bit parts of a 16 bit register as input where divl uses two registers. int foo(unsigned char a) { return a/10; } int bar(unsigned char a, unsigned char b) { return a/b; } compiles into (x86_64) _foo: imull $205, %edi, %eax shrl $11, %eax ret _bar: movzbl %dil, %eax divb %sil, %al movzbl %al, %eax ret llvm-svn: 130615
* make instcombine only rewrite a chain of computation Chris Lattner2009-11-071-0/+2
| | | | | | | | | | (eliminating some extends) if the new type of the computation is legal or if both the source and dest are illegal. This prevents instcombine from changing big chains of computation into i64 on 32-bit targets for example. llvm-svn: 86398
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-111-1/+1
| | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-081-1/+1
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-081-1/+1
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* PR4548: optimize zext+udiv+trunc to udiv.Eli Friedman2009-07-131-0/+19
llvm-svn: 75539
OpenPOWER on IntegriCloud