summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* PR9218: SimplifyDemandedVectorElts can return a non-null value that is notEli Friedman2011-02-19
| | | | | | | | | the instruction passed in. Make sure to account for this correctly, instead of looping infinitely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126058 91177308-0d34-0410-b5e6-96231b3b80d8
* implement PR9264: disambiguating 'bt mem, imm' as a btl.Chris Lattner2011-02-19
| | | | | | | | This is reasonable to do since all bt-mem forms do the same thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126047 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite the memset_pattern pattern generation stuff to accept any 2/4/8/16-byteChris Lattner2011-02-19
| | | | | | | | | | | | | | | | | | | | constant, including globals. This makes us generate much more "pretty" pattern globals as well because it doesn't break it down to an array of bytes all the time. This enables us to handle stores of relocatable globals. This kicks in about 48 times in 254.gap, giving us stuff like this: @.memset_pattern40 = internal constant [2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*] [%struct.TypHeader* (%struct.TypHeader*, %struct .TypHeader*)* @IsFalse, %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)* @IsFalse], align 16 ... call void @memset_pattern16(i8* %scevgep5859, i8* bitcast ([2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]* @.memset_pattern40 to i8* ), i64 %tmp75) nounwind git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126044 91177308-0d34-0410-b5e6-96231b3b80d8
* Stores of null pointers should turn into memset, we weren't recognizingChris Lattner2011-02-19
| | | | | | | them as splat values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126041 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement rdar://9009151, transforming strided loop stores ofChris Lattner2011-02-19
| | | | | | | | | | | | | | unsplatable values into memset_pattern16 when it is available (recent darwins). This transforms lots of strided loop stores of ints for example, like 5 in vpr: Formed memset: call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25) from store to: {%3,+,4}<%11> at: store i32 3, i32* %scevgep, align 4, !tbaa !4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126040 91177308-0d34-0410-b5e6-96231b3b80d8
* DIE numbers do not add any value in this test. Devang Patel2011-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126008 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not lose debug info of an inlined function argument even if the argument ↵Devang Patel2011-02-18
| | | | | | | | | is only used through GEPs. This time with a fix that avoids using invalidated DenseMap iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125984 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r114997 now that the buildbots have been updated.Bill Wendling2011-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125960 91177308-0d34-0410-b5e6-96231b3b80d8
* Add assembly parsing support for "msr" and also fix its encoding. Also addBruno Cardoso Lopes2011-02-18
| | | | | | | | testcases for the disassembler to make sure it still works for "msr". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125948 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some transforms of the kind X-Y>X -> 0>Y which are valid when there is noDuncan Sands2011-02-18
| | | | | | | overflow. These subsume some existing equality transforms, so zap those. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125843 91177308-0d34-0410-b5e6-96231b3b80d8
* add a testcase for r125827Chris Lattner2011-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125831 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.Cameron Zwarich2011-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125830 91177308-0d34-0410-b5e6-96231b3b80d8
* prevent jump threading from merging blocks when their address isChris Lattner2011-02-18
| | | | | | | | | | | | | | | | | | | taken (and used!). This prevents merging the blocks (invalidating the block addresses) in a case like this: #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) void foo() { printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); } which fixes PR4151. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125829 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize monitor/mwait with explicit register argumentsJoerg Sonnenberger2011-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125805 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize leavel and leaveq aliases for leave.Joerg Sonnenberger2011-02-17
| | | | | | | Validate encoding of leave in 64bit mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125795 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not lose debug info of an inlined function argument even if the argument ↵Devang Patel2011-02-17
| | | | | | is only used through GEPs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125794 91177308-0d34-0410-b5e6-96231b3b80d8
* have instcombine preserve nsw/nuw/exact when sinkingChris Lattner2011-02-17
| | | | | | | common operations through a phi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125790 91177308-0d34-0410-b5e6-96231b3b80d8
* fix instcombine merging GEPs through a PHI to only make theChris Lattner2011-02-17
| | | | | | | result inbounds if all of the inputs are inbounds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125785 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance constant folding of bitcast operations on vectors of floats.Nadav Rotem2011-02-17
| | | | | | | | | Add getAllOnesValue of FP numbers to Constants and APFloat. Add more tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125776 91177308-0d34-0410-b5e6-96231b3b80d8
* Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.NAKAMURA Takumi2011-02-17
| | | | | | No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. In llvm side, i686 and x64 can be treated as similar way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125747 91177308-0d34-0410-b5e6-96231b3b80d8
* Transform "A + B >= A + C" into "B >= C" if the adds do not wrap. Likewise ↵Duncan Sands2011-02-17
| | | | | | | | | | for some variations (some of these were already present so I unified the code). Spotted by my auto-simplifier as occurring a lot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125734 91177308-0d34-0410-b5e6-96231b3b80d8
* preserve NUW/NSW when transforming add x,xChris Lattner2011-02-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125711 91177308-0d34-0410-b5e6-96231b3b80d8
* filecheckizeChris Lattner2011-02-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125710 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR9215, preventing -reassociate from clearing nsw/nuw whenChris Lattner2011-02-17
| | | | | | | it swaps the LHS/RHS of a single binop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125700 91177308-0d34-0410-b5e6-96231b3b80d8
* Gas is very inconsistent about when a relaxation/relocation is needed. DoRafael Espindola2011-02-16
| | | | | | the right thing and stop trying to copy it. Fixes PR8944. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
* The change for PR9190 wasn't quite right. We need to avoid making theEric Christopher2011-02-16
| | | | | | | | | | | transformation if we can't legally create a build vector of the correct type. Check that we can make the transformation first, and add a TODO to refactor this code with similar cases. Fixes: PR9223 and rdar://9000350 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125631 91177308-0d34-0410-b5e6-96231b3b80d8
* Add testcase for PR9190.Eric Christopher2011-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125630 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125629 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach PatternMatch that splat vectors could be floating point as well asNick Lewycky2011-02-15
| | | | | | | integer. Fixes PR9228! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125613 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for parsing [expr].Roman Divacky2011-02-15
| | | | | | | | This is submitted by Joerg Sonnenberger and fixes his PR8685. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125595 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore DBG_VALUE machine instructions while constructing instruction ranges ↵Devang Patel2011-02-15
| | | | | | | | | based on location info. Machine instruction range consisting of only DBG_VALUE MIs only contributes consecutive labels in assembly output, which is harmless, and empty scope entry in DebugInfo, which confuses debugger tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125577 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 9216 - Endless loop in InstCombine pass.Nadav Rotem2011-02-15
| | | | | | | | | The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is actually a xor -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125557 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value ↵Devang Patel2011-02-14
| | | | | | that is modified inside loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125529 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch llvm to using comdats. For now always use groups with a singleRafael Espindola2011-02-14
| | | | | | section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.Bob Wilson2011-02-14
| | | | | | | The i64_buildvector test in this file relies on the alignment of i64 and f64 types being the same, which is true for Darwin but not AAPCS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125525 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix encoding and add parsing support for the arm/thumb CPS instruction:Bruno Cardoso Lopes2011-02-14
| | | | | | | | | | | | | | - Add custom operand matching for imod and iflags. - Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC from mnemonic. - While adding ".w" as an operand, don't change "Head" to avoid passing the wrong mnemonic to ParseOperand. - Add asm parser tests. - Add disassembler tests just to make sure it can catch all cps versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125489 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR9210 by implementing some type legalization logic for Chris Lattner2011-02-14
| | | | | | | vector fp conversions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125482 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance ComputeMaskedBits to know that aligned frameindexesChris Lattner2011-02-13
| | | | | | | | | | | | | | | | | | | have their low bits set to zero. This allows us to optimize out explicit stack alignment code like in stack-align.ll:test4 when it is redundant. Doing this causes the code generator to start turning FI+cst into FI|cst all over the place, which is general goodness (that is the canonical form) except that various pieces of the code generator don't handle OR aggressively. Fix this by introducing a new SelectionDAG::isBaseWithConstantOffset predicate, and using it in places that are looking for ADD(X,CST). The ARM backend in particular was missing a lot of addressing mode folding opportunities around OR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125470 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,Duncan Sands2011-02-13
| | | | | | | | | plus some variations of this. According to my auto-simplifier this occurs a lot but usually in combination with max/min idioms. Because max/min aren't handled yet this unfortunately doesn't have much effect in the testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125462 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix testNadav Rotem2011-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125460 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a regression from r125393;Nadav Rotem2011-02-13
| | | | | | | | | | | | | | | It caused a crash in MultiSource/Benchmarks/Bullet. Opt hit an assertion with "opt -std-compile-opts" because Constant::getAllOnesValue doesn't know how to handle floats. This patch added a test to reproduce the problem and a check that the destination vector is of integer type. Thank you Benjamin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125459 91177308-0d34-0410-b5e6-96231b3b80d8
* when legalizing extremely wide shifts, make sure that Chris Lattner2011-02-13
| | | | | | | | | | the shift amounts are in a suitably wide type so that we don't generate out of range constant shift amounts. This fixes PR9028. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125458 91177308-0d34-0410-b5e6-96231b3b80d8
* fix visitShift to properly zero extend the shift amount if the provided operandChris Lattner2011-02-13
| | | | | | | | is narrower than the shift register. Doing an anyext provides undefined bits in the top part of the register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125457 91177308-0d34-0410-b5e6-96231b3b80d8
* add PR#Chris Lattner2011-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125455 91177308-0d34-0410-b5e6-96231b3b80d8
* implement instcombine folding for things like (x >> c) < 42.Chris Lattner2011-02-13
| | | | | | | We were previously simplifying divisions, but not right shifts! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125454 91177308-0d34-0410-b5e6-96231b3b80d8
* teach SCEV that the scale and addition of an inbounds gep don't NSW.Chris Lattner2011-02-13
| | | | | | | | This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and generally makes things more precise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125449 91177308-0d34-0410-b5e6-96231b3b80d8
* Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.Reid Kleckner2011-02-12
| | | | | | | | | These are just FXSAVE and FXRSTOR with REX.W prefixes. These versions use 64-bit pointer values instead of 32-bit pointer values in the memory map they dump and restore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125446 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.Venkatraman Govindaraju2011-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125444 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyLibCalls: Add missing legalize check on various printf to puts andDaniel Dunbar2011-02-12
| | | | | | putchar transforms, their return values are not compatible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125442 91177308-0d34-0410-b5e6-96231b3b80d8
* tests: FileCheckizeDaniel Dunbar2011-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125441 91177308-0d34-0410-b5e6-96231b3b80d8