summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Enhance constant folding of bitcast operations on vectors of floats.Nadav Rotem2011-02-171-1/+41
| | | | | | | Add getAllOnesValue of FP numbers to Constants and APFloat. Add more tests. llvm-svn: 125776
* Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.NAKAMURA Takumi2011-02-172-2/+2
| | | | | | 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. llvm-svn: 125747
* Transform "A + B >= A + C" into "B >= C" if the adds do not wrap. Likewise ↵Duncan Sands2011-02-171-0/+19
| | | | | | | | | for some variations (some of these were already present so I unified the code). Spotted by my auto-simplifier as occurring a lot. llvm-svn: 125734
* preserve NUW/NSW when transforming add x,xChris Lattner2011-02-171-0/+8
| | | | llvm-svn: 125711
* filecheckizeChris Lattner2011-02-171-3/+14
| | | | llvm-svn: 125710
* fix PR9215, preventing -reassociate from clearing nsw/nuw whenChris Lattner2011-02-171-0/+7
| | | | | | it swaps the LHS/RHS of a single binop. llvm-svn: 125700
* Gas is very inconsistent about when a relaxation/relocation is needed. DoRafael Espindola2011-02-161-17/+3
| | | | | | the right thing and stop trying to copy it. Fixes PR8944. llvm-svn: 125648
* The change for PR9190 wasn't quite right. We need to avoid making theEric Christopher2011-02-161-0/+41
| | | | | | | | | 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 llvm-svn: 125631
* Add testcase for PR9190.Eric Christopher2011-02-161-0/+35
| | | | llvm-svn: 125630
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-0/+107
| | | | llvm-svn: 125629
* Teach PatternMatch that splat vectors could be floating point as well asNick Lewycky2011-02-151-0/+28
| | | | | | integer. Fixes PR9228! llvm-svn: 125613
* Add support for parsing [expr].Roman Divacky2011-02-152-0/+10
| | | | | | This is submitted by Joerg Sonnenberger and fixes his PR8685. llvm-svn: 125595
* Ignore DBG_VALUE machine instructions while constructing instruction ranges ↵Devang Patel2011-02-151-2/+2
| | | | | | | | 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. llvm-svn: 125577
* Fix 9216 - Endless loop in InstCombine pass.Nadav Rotem2011-02-151-0/+19
| | | | | | | The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is actually a xor -1. llvm-svn: 125557
* Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value ↵Devang Patel2011-02-141-0/+59
| | | | | | that is modified inside loop. llvm-svn: 125529
* Switch llvm to using comdats. For now always use groups with a singleRafael Espindola2011-02-142-3/+3
| | | | | | section. llvm-svn: 125526
* PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.Bob Wilson2011-02-141-2/+2
| | | | | | | 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. llvm-svn: 125525
* Fix encoding and add parsing support for the arm/thumb CPS instruction:Bruno Cardoso Lopes2011-02-145-0/+40
| | | | | | | | | | | | - 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. llvm-svn: 125489
* fix PR9210 by implementing some type legalization logic for Chris Lattner2011-02-141-0/+8
| | | | | | vector fp conversions. llvm-svn: 125482
* Enhance ComputeMaskedBits to know that aligned frameindexesChris Lattner2011-02-132-4/+15
| | | | | | | | | | | | | | | | | 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. llvm-svn: 125470
* Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,Duncan Sands2011-02-131-0/+20
| | | | | | | | 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. llvm-svn: 125462
* Fix testNadav Rotem2011-02-131-1/+1
| | | | llvm-svn: 125460
* Fix a regression from r125393;Nadav Rotem2011-02-131-1/+17
| | | | | | | | | | | | | 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! llvm-svn: 125459
* when legalizing extremely wide shifts, make sure that Chris Lattner2011-02-131-0/+12
| | | | | | | | | the shift amounts are in a suitably wide type so that we don't generate out of range constant shift amounts. This fixes PR9028. llvm-svn: 125458
* fix visitShift to properly zero extend the shift amount if the provided operandChris Lattner2011-02-132-3/+1
| | | | | | | is narrower than the shift register. Doing an anyext provides undefined bits in the top part of the register. llvm-svn: 125457
* add PR#Chris Lattner2011-02-131-0/+1
| | | | llvm-svn: 125455
* implement instcombine folding for things like (x >> c) < 42.Chris Lattner2011-02-131-2/+11
| | | | | | We were previously simplifying divisions, but not right shifts! llvm-svn: 125454
* teach SCEV that the scale and addition of an inbounds gep don't NSW.Chris Lattner2011-02-132-4/+31
| | | | | | | This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and generally makes things more precise. llvm-svn: 125449
* Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.Reid Kleckner2011-02-121-0/+8
| | | | | | | | 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. llvm-svn: 125446
* Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.Venkatraman Govindaraju2011-02-121-0/+13
| | | | llvm-svn: 125444
* SimplifyLibCalls: Add missing legalize check on various printf to puts andDaniel Dunbar2011-02-121-7/+20
| | | | | | putchar transforms, their return values are not compatible. llvm-svn: 125442
* tests: FileCheckizeDaniel Dunbar2011-02-121-3/+5
| | | | llvm-svn: 125441
* A fix for 9165.Nadav Rotem2011-02-121-0/+32
| | | | | | | | The DAGCombiner created illegal BUILD_VECTOR operations. The patch added a check that either illegal operations are allowed or that the created operation is legal. llvm-svn: 125435
* Also fold (A+B) == A -> B == 0 when the add is commuted.Benjamin Kramer2011-02-111-10/+18
| | | | llvm-svn: 125411
* Per discussion with Dan G, inbounds geps *certainly* can haveChris Lattner2011-02-111-2/+2
| | | | | | | | | | | unsigned overflow (e.g. "gep P, -1"), and while they can have signed wrap in theoretical situations, modelling an AddRec as not having signed wrap is going enough for any case we can think of today. In the future if this isn't enough, we can revisit this. Modeling them as having NUW isn't causing any known problems either FWIW. llvm-svn: 125410
* Implement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.Nate Begeman2011-02-111-0/+48
| | | | | | This avoids moving each element to the integer register file and calling __divsi3 etc. on it. llvm-svn: 125402
* Fix 9173.Nadav Rotem2011-02-112-0/+27
| | | | | | | Add more folding patterns to constant expressions of vector selects and vector bitcasts. llvm-svn: 125393
* Disable this test for now...Daniel Dunbar2011-02-111-0/+3
| | | | llvm-svn: 125361
* Fix buggy fcopysign lowering.Evan Cheng2011-02-111-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This define float @foo(float %x, float %y) nounwind readnone { entry: %0 = tail call float @copysignf(float %x, float %y) nounwind readnone ret float %0 } Was compiled to: vmov s0, r1 bic r0, r0, #-2147483648 vmov s1, r0 vcmpe.f32 s0, #0 vmrs apsr_nzcv, fpscr it lt vneglt.f32 s1, s1 vmov r0, s1 bx lr This fails to copy the sign of -0.0f because it's lost during the float to int conversion. Also, it's sub-optimal when the inputs are in GPR registers. Now it uses integer and + or operations when it's profitable. And it's correct! lsrs r1, r1, #31 bfi r0, r1, #31, #1 bx lr rdar://8984306 llvm-svn: 125357
* Add a test for the LSR issue exposed by r125254.Cameron Zwarich2011-02-111-0/+32
| | | | llvm-svn: 125325
* Tolerate degenerate phi nodes that can occur in the middle of optimizationNick Lewycky2011-02-101-0/+24
| | | | | | passes. Fixes PR9112. Patch by Jakub Staszak! llvm-svn: 125319
* Rename 'loopsimplify' to 'loop-simplify'.Cameron Zwarich2011-02-1020-21/+21
| | | | llvm-svn: 125317
* Add mips o32 tests again with the hope that the buildbot won't complaint againBruno Cardoso Lopes2011-02-101-0/+322
| | | | llvm-svn: 125316
* Remove the test to silence the buildbot, will check it in again with a ↵Bruno Cardoso Lopes2011-02-101-321/+0
| | | | | | proper fix soon llvm-svn: 125305
* Fix a lot of o32 CC issues and add a bunch of tests. Patch by Akira Hatanaka ↵Bruno Cardoso Lopes2011-02-101-0/+321
| | | | | | with some small modifications by me. llvm-svn: 125292
* ptx: add passing parameter to kernel functionsChe-Liang Chiou2011-02-101-1/+8
| | | | llvm-svn: 125279
* implement the first part of PR8882: when lowering an inboundsChris Lattner2011-02-102-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | gep to explicit addressing, we know that none of the intermediate computation overflows. This could use review: it seems that the shifts certainly wouldn't overflow, but could the intermediate adds overflow if there is a negative index? Previously the testcase would instcombine to: define i1 @test(i64 %i) { %p1.idx.mask = and i64 %i, 4611686018427387903 %cmp = icmp eq i64 %p1.idx.mask, 1000 ret i1 %cmp } now we get: define i1 @test(i64 %i) { %cmp = icmp eq i64 %i, 1000 ret i1 %cmp } llvm-svn: 125271
* Enhance a bunch of transformations in instcombine to start generatingChris Lattner2011-02-1010-18/+51
| | | | | | | | | | | exact/nsw/nuw shifts and have instcombine infer them when it can prove that the relevant properties are true for a given shift without them. Also, a variety of refactoring to use the new patternmatch logic thrown in for good luck. I believe that this takes care of a bunch of related code quality issues attached to PR8862. llvm-svn: 125267
* Enhance the "compare with shift" and "compare with div" Chris Lattner2011-02-102-30/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizations to be much more aggressive in the face of exact/nsw/nuw div and shifts. For example, these (which are the same except the first is 'exact' sdiv: define i1 @sdiv_icmp4_exact(i64 %X) nounwind { %A = sdiv exact i64 %X, -5 ; X/-5 == 0 --> x == 0 %B = icmp eq i64 %A, 0 ret i1 %B } define i1 @sdiv_icmp4(i64 %X) nounwind { %A = sdiv i64 %X, -5 ; X/-5 == 0 --> x == 0 %B = icmp eq i64 %A, 0 ret i1 %B } compile down to: define i1 @sdiv_icmp4_exact(i64 %X) nounwind { %1 = icmp eq i64 %X, 0 ret i1 %1 } define i1 @sdiv_icmp4(i64 %X) nounwind { %X.off = add i64 %X, 4 %1 = icmp ult i64 %X.off, 9 ret i1 %1 } This happens when you do something like: (ptr1-ptr2) == 42 where the pointers are pointers to non-unit types. llvm-svn: 125266
* more cleanups, notably bitcast isn't used for "signed to unsigned type Chris Lattner2011-02-101-1/+1
| | | | | | conversions". :) llvm-svn: 125265
OpenPOWER on IntegriCloud