aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/cast.ll
Commit message (Collapse)AuthorAgeFilesLines
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up previous cast optimization a bit. Also make zext elimination a bit ↵Evan Cheng2009-01-161-0/+7
| | | | | | more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement rdar://6480391, extending of equality icmp's to avoid a truncation.Chris Lattner2009-01-091-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed this in the code compiled for a routine using std::map, which produced this code: %25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly %.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1] %tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1] %toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1] br i1 %toBool, label %bb3, label %bb4 which compiled to: call L_memcmp$stub shrl $31, %eax testb %al, %al jne LBB1_11 ## with this change, we compile it to: call L_memcmp$stub testl %eax, %eax js LBB1_11 This triggers all the time in common code, with patters like this: %169 = and i32 %ply, 1 ; <i32> [#uses=1] %170 = trunc i32 %169 to i8 ; <i8> [#uses=1] %toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1] %7 = lshr i32 %6, 24 ; <i32> [#uses=1] %9 = trunc i32 %7 to i8 ; <i8> [#uses=1] %10 = icmp ne i8 %9, 0 ; <i1> [#uses=1] etc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61985 91177308-0d34-0410-b5e6-96231b3b80d8
* Byebye llvm-upgrade!Tanya Lattner2008-03-251-148/+158
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48762 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1319:Reid Spencer2007-04-151-0/+1
| | | | | | | | Make use of the END. facility on all files > 1K so that we aren't wasting CPU cycles searching for RUN: lines that we'll never find. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36059 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1319:Reid Spencer2007-04-141-2/+2
| | | | | | | Upgrade tests to work with new llvm.exp version of llvm_runtest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36013 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-231-5/+6
| | | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the llvm-upgrade program to upgrade llvm assembly.Reid Spencer2006-12-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcaseChris Lattner2006-11-291-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32010 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcaseChris Lattner2006-11-291-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32008 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-271-2/+6
| | | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase, malloc should be promoted to [2 x double].Chris Lattner2006-10-011-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30681 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcaseChris Lattner2006-09-181-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30455 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase for instcombineChris Lattner2006-05-131-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28272 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcaseChris Lattner2006-05-051-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28125 91177308-0d34-0410-b5e6-96231b3b80d8
* These casts should turn into gep instructionsChris Lattner2006-04-121-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27618 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new testcase for an eliminable castChris Lattner2006-01-191-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25451 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcaseChris Lattner2005-01-311-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19952 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename these to start with %c, as they are the only ones that are checked.Chris Lattner2005-01-311-15/+15
| | | | | | | No change to the tests themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19948 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bunch of tests for cases that should be eliminated.Chris Lattner2005-01-011-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19217 91177308-0d34-0410-b5e6-96231b3b80d8
* More testcases for recent instcombine patchesChris Lattner2004-09-291-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16569 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcases missed by the instruction combinerChris Lattner2004-07-201-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15017 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new test16 and fix some other tests that were not properly writtenChris Lattner2004-05-251-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13735 91177308-0d34-0410-b5e6-96231b3b80d8
* The instruction combining pass removes dead instructions, there is no needChris Lattner2004-02-281-1/+1
| | | | | | | to run the die pass after it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11942 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for casts that should be eliminatedChris Lattner2004-02-231-1/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11741 91177308-0d34-0410-b5e6-96231b3b80d8
* Test that the instruction combiner can fold away a cast in a GEP instruction.Chris Lattner2004-02-221-0/+8
| | | | | | | This occurs in 164.gzip, as a result of it declaring arrays extern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11701 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for instcombine transmogrifying allocation instructionsChris Lattner2003-11-021-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9653 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcaseChris Lattner2003-10-071-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8953 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'.Misha Brukman2003-09-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8558 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize tests because we no longer cannonicalize X != 0 -> cast X to boolChris Lattner2003-08-131-23/+0
| | | | | | | In fact, we plan to eliminate cast to bool entirely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7805 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcasesChris Lattner2003-07-221-6/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7240 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of grep-not scriptChris Lattner2003-06-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6966 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert scripts from using explicit control flow to use the new grep-not scriptChris Lattner2003-06-281-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6955 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix commentChris Lattner2003-06-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6872 91177308-0d34-0410-b5e6-96231b3b80d8
* Yet another testcaseChris Lattner2003-06-231-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6871 91177308-0d34-0410-b5e6-96231b3b80d8
* Test cases for when casts to bool can be eliminatedChris Lattner2003-06-231-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6870 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more testcases for things to get optimized awayChris Lattner2002-09-231-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3896 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bunch of testcases for cast-of-casts that should be removed.Chris Lattner2002-08-151-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3345 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix testcase to actually test what we think we areChris Lattner2002-08-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3338 91177308-0d34-0410-b5e6-96231b3b80d8
* These tests should not run -dce pass to cleanup instcombine.Chris Lattner2002-08-021-1/+1
| | | | | | | If instcombine is making dead instructions, ALL that should be used is -die git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3221 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another testcase that isn't failing because of another bug in instcombineChris Lattner2002-08-021-7/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3220 91177308-0d34-0410-b5e6-96231b3b80d8
* Intitial checkin of cast testsChris Lattner2002-05-021-0/+23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2427 91177308-0d34-0410-b5e6-96231b3b80d8