summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-1413-180/+99
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* add a new ArrayRef class. This is intended to replace the idiom weChris Lattner2011-02-141-0/+121
| | | | | | | | use in many places where we pass a pointer and size to abstract APIs that can take C arrays, std::vector, SmallVector, etc. It is to arrays what StringRef is to strings. llvm-svn: 125486
* fix PR9210 by implementing some type legalization logic for Chris Lattner2011-02-143-14/+55
| | | | | | vector fp conversions. llvm-svn: 125482
* fix two comment thinkosChris Lattner2011-02-142-2/+2
| | | | llvm-svn: 125481
* Fix typo in comment.Nick Lewycky2011-02-141-1/+1
| | | | llvm-svn: 125480
* Add some statistics to StrongPHIElimination.Cameron Zwarich2011-02-141-0/+8
| | | | llvm-svn: 125477
* Add a statistic to PHIElimination tracking the number of critical edges split.Cameron Zwarich2011-02-141-2/+7
| | | | llvm-svn: 125476
* missed a headerChris Lattner2011-02-131-0/+7
| | | | llvm-svn: 125471
* Enhance ComputeMaskedBits to know that aligned frameindexesChris Lattner2011-02-137-76/+106
| | | | | | | | | | | | | | | | | 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
* Adapt docs to '-loopsimplify -> -loop-simplify' changeTobias Grosser2011-02-131-2/+2
| | | | llvm-svn: 125469
* fix thinko :)Chris Lattner2011-02-131-2/+2
| | | | llvm-svn: 125466
* Revisit my fix for PR9028: the issue is that DAGCombine was Chris Lattner2011-02-135-46/+60
| | | | | | | | | generating i8 shift amounts for things like i1024 types. Add an assert in getNode to prevent this from occuring in the future, fix the buggy transformation, revert my previous patch, and document this gotcha in ISDOpcodes.h llvm-svn: 125465
* remove a now-unneccesary cast.Chris Lattner2011-02-131-1/+1
| | | | llvm-svn: 125464
* Remove pointless blank line.Duncan Sands2011-02-131-1/+0
| | | | llvm-svn: 125463
* Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,Duncan Sands2011-02-132-2/+69
| | | | | | | | 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-132-2/+19
| | | | | | | | | | | | | 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-133-3/+21
| | | | | | | | | 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-133-23/+20
| | | | | | | is narrower than the shift register. Doing an anyext provides undefined bits in the top part of the register. llvm-svn: 125457
* improve solaris support, from PR9109, patch by Yuri!Chris Lattner2011-02-131-0/+5
| | | | llvm-svn: 125456
* add PR#Chris Lattner2011-02-131-0/+1
| | | | llvm-svn: 125455
* implement instcombine folding for things like (x >> c) < 42.Chris Lattner2011-02-132-10/+61
| | | | | | We were previously simplifying divisions, but not right shifts! llvm-svn: 125454
* add a helper method.Chris Lattner2011-02-131-0/+7
| | | | llvm-svn: 125453
* Wrap the struct in an anonymous namespace.Argyrios Kyrtzidis2011-02-131-0/+2
| | | | llvm-svn: 125452
* refactor some code out into a helper method.Chris Lattner2011-02-132-46/+56
| | | | llvm-svn: 125451
* teach SCEV that the scale and addition of an inbounds gep don't NSW.Chris Lattner2011-02-133-6/+36
| | | | | | | 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-122-0/+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. llvm-svn: 125446
* Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.Venkatraman Govindaraju2011-02-122-0/+16
| | | | llvm-svn: 125444
* SimplifyLibCalls: Add missing legalize check on various printf to puts andDaniel Dunbar2011-02-122-12/+29
| | | | | | putchar transforms, their return values are not compatible. llvm-svn: 125442
* tests: FileCheckizeDaniel Dunbar2011-02-121-3/+5
| | | | llvm-svn: 125441
* Preserve aliases if needed.Rafael Espindola2011-02-121-0/+8
| | | | llvm-svn: 125439
* Add a note about SSE4.1 roundss/roundsd.Benjamin Kramer2011-02-121-0/+11
| | | | llvm-svn: 125438
* A fix for 9165.Nadav Rotem2011-02-122-4/+41
| | | | | | | | 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
* AsmMatcher custom operand parser failure enhancements.Jim Grosbach2011-02-124-40/+51
| | | | | | | | | | | Teach the AsmMatcher handling to distinguish between an error custom-parsing an operand and a failure to match. The former should propogate the error upwards, while the latter should continue attempting to parse with alternative matchers. Update the ARM asm parser accordingly. llvm-svn: 125426
* Fix a silly bug I introduced when dropping std::string.Rafael Espindola2011-02-121-0/+2
| | | | llvm-svn: 125420
* attempt to capture recent discussion about overflow and inbounds geps.Chris Lattner2011-02-111-7/+21
| | | | llvm-svn: 125412
* Also fold (A+B) == A -> B == 0 when the add is commuted.Benjamin Kramer2011-02-112-12/+22
| | | | llvm-svn: 125411
* Per discussion with Dan G, inbounds geps *certainly* can haveChris Lattner2011-02-112-5/+16
| | | | | | | | | | | 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
* When lowering an inbounds gep, the intermediate adds can haveChris Lattner2011-02-111-6/+3
| | | | | | | | unsigned overflow (e.g. due to a negative array index), but the scales on array size multiplications are known to not sign wrap. llvm-svn: 125409
* Tidy out asm matcher .inc output.Jim Grosbach2011-02-111-2/+2
| | | | llvm-svn: 125408
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-113-12/+32
| | | | | | on the host OS. Reviewed by dgregor. llvm-svn: 125406
* Implement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.Nate Begeman2011-02-112-0/+230
| | | | | | This avoids moving each element to the integer register file and calling __divsi3 etc. on it. llvm-svn: 125402
* SimplifySelectOps can only handle selects with a scalar condition. Add a checkNadav Rotem2011-02-111-0/+3
| | | | | | that the condition is not a vector. llvm-svn: 125398
* Fix 9173.Nadav Rotem2011-02-113-0/+67
| | | | | | | Add more folding patterns to constant expressions of vector selects and vector bitcasts. llvm-svn: 125393
* Fix #9190Nadav Rotem2011-02-111-1/+1
| | | | | | | | | | | The bug happens when the DAGCombiner attempts to optimize one of the patterns of the SUB opcode. It tries to create a zero of type v2i64. This type is legal on 32bit machines, but the initializer of this vector (i64) is target dependent. Currently, the initializer attempts to create an i64 zero constant, which fails. Added a flag to tell the DAGCombiner to create a legal zero, if we require that the pass would generate legal types. llvm-svn: 125391
* Test commit.Nadav Rotem2011-02-111-1/+1
| | | | llvm-svn: 125389
* More whitespace cleanup...Jim Grosbach2011-02-112-41/+41
| | | | llvm-svn: 125388
* Remove trailing whitespace.Jim Grosbach2011-02-111-6/+6
| | | | llvm-svn: 125385
* Poison the relational operators ==, !=, <, <=, >=, > on llvm::OptionalDouglas Gregor2011-02-111-0/+54
| | | | | | | objects, since they'll end up using the implicit conversion to "bool" and causing some very "fun" surprises. llvm-svn: 125380
* Make LoopUnswitch preserve ScalarEvolution by just forgetting everything aboutCameron Zwarich2011-02-111-0/+5
| | | | | | | a loop when unswitching it. It only does this in the complex case, because everything should be fine already in the simple case. llvm-svn: 125369
OpenPOWER on IntegriCloud