summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Use 'unsigned' instead of 'int' in several places when retrieving number of ↵Craig Topper2012-04-271-12/+12
| | | | | | vector elements. llvm-svn: 155742
* Add x86-specific DAG combine to simplify:Chad Rosier2012-04-272-0/+50
| | | | | | | | | | | | | | | | | | | | | x == -y --> x+y == 0 x != -y --> x+y != 0 On x86, the generated code goes from negl %esi cmpl %esi, %edi je .LBB0_2 to addl %esi, %edi je .L4 This case is correctly handled for ARM with "cmn". Patch by Manman Ren. rdar://11245199 PR12545 llvm-svn: 155739
* [Support/YAMLParser] Fix ASan found bugs.Michael J. Spencer2012-04-271-1/+7
| | | | llvm-svn: 155735
* Tidy up spacing.Craig Topper2012-04-271-2/+2
| | | | llvm-svn: 155733
* Make test less fragile.Evan Cheng2012-04-271-2/+2
| | | | llvm-svn: 155732
* Don't vectorize target-specific types (ppc_fp128, x86_fp80, etc.).Hal Finkel2012-04-272-0/+24
| | | | | | | | | | Target specific types should not be vectorized. As a practical matter, these types are already register matched (at least in the x86 case), and codegen does not always work correctly (at least in the ppc case, and this is not worth fixing because ppc_fp128 is currently broken and will probably go away soon). llvm-svn: 155729
* Change recurse depth limit to uint32 to fix warning.David Blaikie2012-04-271-1/+1
| | | | llvm-svn: 155727
* Switch to c-style comments in a C file.David Blaikie2012-04-271-3/+4
| | | | llvm-svn: 155726
* Miscellaneous accumulated cleanups.Dan Gohman2012-04-271-71/+57
| | | | llvm-svn: 155725
* Fix the order of the operands in the llvm.fma intrinsic patterns for ARM,Lang Hames2012-04-273-27/+28
| | | | | | <rdar://problem/11325085>. llvm-svn: 155724
* Add an early bailout to IsValueFullyAvailableInBlock from deeply nested blocks.Mon P Wang2012-04-271-3/+12
| | | | | | | The limit is set to an arbitrary 1000 recursion depth to avoid stack overflow issues. <rdar://problem/11286839>. llvm-svn: 155722
* Reapply r155682, making constant folding more consistent, with a fix to workDan Gohman2012-04-275-38/+90
| | | | | | properly with how the code handles all-undef PHI nodes. llvm-svn: 155721
* Fix ARM assembly parsing for upper case condition codes on IT instructions.Richard Barton2012-04-272-1/+14
| | | | llvm-svn: 155720
* Remove a docs reference to the CBackend.Jim Grosbach2012-04-271-1/+1
| | | | llvm-svn: 155716
* Missed some register numbers.Benjamin Kramer2012-04-271-3/+3
| | | | llvm-svn: 155706
* Update edis test for r155704.Benjamin Kramer2012-04-271-1/+1
| | | | llvm-svn: 155705
* X86: Don't emit conditional floating point moves on when targeting ↵Benjamin Kramer2012-04-277-17/+101
| | | | | | | | | | | | | | | pre-pentiumpro architectures. * Model FPSW (the FPU status word) as a register. * Add ISel patterns for the FUCOM*, FNSTSW and SAHF instructions. * During Legalize/Lowering, build a node sequence to transfer the comparison result from FPSW into EFLAGS. If you're wondering about the right-shift: That's an implicit sub-register extraction (%ax -> %ah) which is handled later on by the instruction selector. Fixes PR6679. Patch by Christoph Erhardt! llvm-svn: 155704
* Update config.sub in the sample project.Evgeniy Stepanov2012-04-271-99/+376
| | | | | | | This change replaces projects/sample/autoconf/config.sub with a copy of autoconf/config.sub. llvm-svn: 155703
* [asan] small optimization: do not emit "x+0" instructions Kostya Serebryany2012-04-271-3/+4
| | | | llvm-svn: 155701
* Refactor IT handling not to store the bottom bit of the condition code in ↵Richard Barton2012-04-273-14/+7
| | | | | | the mask operand in the MCInst. llvm-svn: 155700
* Revert r155682, "Use ConstantExpr::getExtractElement when constant-folding ↵NAKAMURA Takumi2012-04-274-74/+35
| | | | | | | | vectors" It broke stage2 build. stage1/clang sometimes crashed. llvm-svn: 155699
* [tsan] Atomic support for ThreadSanitizer, patch by Dmitry VyukovKostya Serebryany2012-04-272-33/+475
| | | | llvm-svn: 155698
* Add mcpu to tests to prevent them from using AVX instructions on Sandy ↵Craig Topper2012-04-2732-49/+49
| | | | | | Bridge after r155618. llvm-svn: 155696
* Implement a bastardized ABI.Evan Cheng2012-04-273-4/+5
| | | | llvm-svn: 155686
* - thumbv6 shouldn't imply +thumb2. Cortex-M0 doesn't suppport 32-bit Thumb2Evan Cheng2012-04-273-16/+40
| | | | | | | | instructions. - However, it does support dmb, dsb, isb, mrs, and msr. rdar://11331541 llvm-svn: 155685
* Use ConstantExpr::getExtractElement when constant-folding vectorsDan Gohman2012-04-274-35/+74
| | | | | | | | | | | | | | | | | | | | | instead of getAggregateElement. This has the advantage of being more consistent and allowing higher-level constant folding to procede even if an inner extract element cannot be folded. Make ConstantFoldInstruction call ConstantFoldConstantExpression on the instruction's operands, making it more consistent with ConstantFoldConstantExpression itself. This makes sure that ConstantExprs get TargetData-aware folding before being handed off as operands for further folding. This causes more expressions to be folded, but due to a known shortcoming in constant folding, this currently has the side effect of stripping a few more nuw and inbounds flags in the non-targetdata side of constant-fold-gep.ll. This is mostly harmless. This fixes rdar://11324230. llvm-svn: 155682
* Break up getProfitableChainIncrement().Jakob Stoklund Olesen2012-04-261-39/+47
| | | | | | | | | | | The required checks are moved to ChainInstruction() itself and the policy decisions are moved to IVChain::isProfitableInc(). Also cache the ExprBase in IVChain to avoid frequent recomputations. No functional change intended. llvm-svn: 155676
* Turn IVChain into a struct.Jakob Stoklund Olesen2012-04-261-19/+42
| | | | | | No functional change intended. llvm-svn: 155675
* Add instcombine patterns for the following transformations:Chad Rosier2012-04-263-0/+43
| | | | | | | | | | (x & y) | (x ^ y) -> x | y (x & y) + (x ^ y) -> x | y Patch by Manman Ren. rdar://10770603 llvm-svn: 155674
* DumpSegment64Command() wasn't returning correct result. Caught by static ↵Evan Cheng2012-04-261-1/+1
| | | | | | analyzer. rdar://11329354 llvm-svn: 155669
* Fix the SD scheduler to avoid gluing the same node twice.Andrew Trick2012-04-262-3/+51
| | | | | | | | | | | DAGCombine strangeness may result in multiple loads from the same offset. They both may try to glue themselves to another load. We could insist that the redundant loads glue themselves to each other, but the beter fix is to bail out from bad gluing at the time we detect it. Fixes rdar://11314175: BuildSchedUnits assert. llvm-svn: 155668
* Defensively guard against calling malloc() with a size of zero.Ted Kremenek2012-04-261-0/+9
| | | | llvm-svn: 155661
* ARM: Thumb ldr(literal) base address alignment is 32-bits.Jim Grosbach2012-04-261-1/+2
| | | | | | | | | | The base address for the PC-relative load is Align(PC,4), so it's the address of the word containing the 16-bit instruction, not the address of the instruction itself. Ugh. rdar://11314619 llvm-svn: 155659
* Add note about returns_twice magic removal from LLVM itself.Joerg Sonnenberger2012-04-261-0/+3
| | | | llvm-svn: 155657
* Trivial change to set UseLeaForSP flag in addition to togglingPreston Gurd2012-04-261-0/+2
| | | | | | | | the FeatureLeaForSP feature bit when llvm auto detects Intel Atom. Patch by Andy Zhang llvm-svn: 155655
* [CMake] Restructure how Clang, Polly and other external projects get included.Michael J. Spencer2012-04-263-21/+25
| | | | | | | | | | | | | | | | | | | While making lld build under the tools directory I decided to refactor how this works. There is now a macro, add_llvm_external_project, which takes the name of the expected subdirectory. This sets up two CMake options. * LLVM_EXTERNAL_${NAME}_SOURCE_DIR This is the path to the source. It defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. * LLVM_EXTERNAL_${NAME}_BUILD Enable and disable building the tool as part of LLVM. I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the GUI. llvm-svn: 155654
* [Support/YAML] Properly fix unitialized variable warning by inserting aMichael J. Spencer2012-04-261-6/+12
| | | | | | 'REPLACEMENT CHARACTER' (U+FFFD) when getAsInteger fails. llvm-svn: 155653
* Fixed SmallMap test. The order of items is undefined in DenseMap. So being ↵Stepan Dyatkovskiy2012-04-261-10/+24
| | | | | | checking the increment for big mode, we can only check that all items are in map. llvm-svn: 155651
* Use VLD1 in NEON extenting-load patterns instead of VLDR.Tim Northover2012-04-262-58/+65
| | | | | | | On some cores it's a bad idea for performance to mix VFP and NEON instructions and since these patterns are NEON anyway, the NEON load should be used. llvm-svn: 155630
* Test commit.Tim Northover2012-04-261-2/+0
| | | | llvm-svn: 155626
* Enable detection of AVX and AVX2 support through CPUID. Add AVX/AVX2 to ↵Craig Topper2012-04-262-13/+9
| | | | | | corei7-avx, core-avx-i, and core-avx2 cpu names. llvm-svn: 155618
* Teach the reassociate pass to fold chains of multiplies with repeatedChandler Carruth2012-04-262-10/+346
| | | | | | | | | | | | | | | | | elements to minimize the number of multiplies required to compute the final result. This uses a heuristic to attempt to form near-optimal binary exponentiation-style multiply chains. While there are some cases it misses, it seems to at least a decent job on a very diverse range of inputs. Initial benchmarks show no interesting regressions, and an 8% improvement on SPASS. Let me know if any other interesting results (in either direction) crop up! Credit to Richard Smith for the core algorithm, and helping code the patch itself. llvm-svn: 155616
* Specify cpu to unbreak tests.Evan Cheng2012-04-2616-17/+17
| | | | llvm-svn: 155604
* If triple is armv7 / thumbv7 and a CPU is specified, do not automatically assumeEvan Cheng2012-04-264-14/+30
| | | | | | | | | | the feature set of v7a. This comes about if the user specifies something like -arch armv7 -mcpu=cortex-m3. We shouldn't be generating instructions such as uxtab in this case. rdar://11318438 llvm-svn: 155601
* Don't forget to reset 'first operand' flag when we're setting the ↵Bill Wendling2012-04-261-5/+8
| | | | | | MDNodeOperand value. llvm-svn: 155599
* Try to fix llvm-arm-linux builder with -mcpu.Jakob Stoklund Olesen2012-04-251-1/+1
| | | | llvm-svn: 155589
* Trivial change to make the test use -mcpu=generic so as to avoidPreston Gurd2012-04-251-1/+1
| | | | | | a failure if run on an Intel Atom with post RA instruction scheduling. llvm-svn: 155587
* Reapply the SmallMap patch with a fix.Benjamin Kramer2012-04-255-0/+1124
| | | | | | Comparing ~0UL with an unsigned will always return false when long is 64 bits long. llvm-svn: 155568
* Print IV chain numbers while collecting them.Jakob Stoklund Olesen2012-04-251-4/+5
| | | | llvm-svn: 155567
* Remove more dead code.Jakob Stoklund Olesen2012-04-253-24/+0
| | | | llvm-svn: 155566
OpenPOWER on IntegriCloud