summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Lower vselects into X86ISD::BLENDI when appropriate.Filipe Cabecinhas2014-05-165-18/+45
| | | | | | | | | | | | | | | | LowerVSELECT will, if possible, generate a X86ISD::BLENDI DAG node if the condition is constant and we can emit that instruction, given the subtarget. This is not enough for all cases. An additional SELECTCombine optimization will be committed. Fixed tests that were expecting variable blends but where a blend+imm can be generated. Added test where we can't emit blend+immediate. Added avx2 blend+imm tests. llvm-svn: 209043
* DebugInfo: Handle emitting constants of C++ unicode character type.David Blaikie2014-05-161-21/+34
| | | | | | | | Patch by Stephan Tolksdorf! (with some test case stuff by me) Differential Revision: http://reviews.llvm.org/D3810 llvm-svn: 209037
* R600/SI: Promote f32 SELECT to i32Tom Stellard2014-05-161-1/+2
| | | | llvm-svn: 209024
* Add comdat key field to llvm.global_ctors and llvm.global_dtorsReid Kleckner2014-05-165-4/+75
| | | | | | | | | | | | | | This allows us to put dynamic initializers for weak data into the same comdat group as the data being initialized. This is necessary for MSVC ABI compatibility. Once we have comdats for guard variables, we can use the combination to help GlobalOpt fire more often for weak data with guarded initialization on other platforms. Reviewers: nlewycky Differential Revision: http://reviews.llvm.org/D3499 llvm-svn: 209015
* Fix most of PR10367.Rafael Espindola2014-05-1627-58/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the design of GlobalAlias so that it doesn't take a ConstantExpr anymore. It now points directly to a GlobalObject, but its type is independent of the aliasee type. To avoid changing all alias related tests in this patches, I kept the common syntax @foo = alias i32* @bar to mean the same as now. The cases that used to use cast now use the more general syntax @foo = alias i16, i32* @bar. Note that GlobalAlias now behaves a bit more like GlobalVariable. We know that its type is always a pointer, so we omit the '*'. For the bitcode, a nice surprise is that we were writing both identical types already, so the format change is minimal. Auto upgrade is handled by looking through the casts and no new fields are needed for now. New bitcode will simply have different types for Alias and Aliasee. One last interesting point in the patch is that replaceAllUsesWith becomes smart enough to avoid putting a ConstantExpr in the aliasee. This seems better than checking and updating every caller. A followup patch will delete getAliasedGlobal now that it is redundant. Another patch will add support for an explicit offset. llvm-svn: 209007
* DebugInfo: Assume the CU's Subprogram list only contains definitions.David Blaikie2014-05-164-4/+4
| | | | | | | | | | | DIBuilder maintains this invariant and the current DwarfDebug code could end up doing weird things if it contained declarations (such as putting the definition DIE inside a CU that contained the declaration - this doesn't seem like a good idea, so rather than adding logic to handle this case we'll just ban in for now & cross that bridge if we come to it later). llvm-svn: 209004
* [ARM64] Increases the Sched Model accuracy for Cortex-A53.Chad Rosier2014-05-162-2/+21
| | | | | | | Patch by Dave Estes <cestes@codeaurora.org> http://reviews.llvm.org/D3769 llvm-svn: 209001
* InstSimplify: Improve handling of ashr/lshrDavid Majnemer2014-05-161-0/+40
| | | | | | | | | | | | | | Summary: Analyze the range of values produced by ashr/lshr cst, %V when it is being used in an icmp. Reviewers: nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3774 llvm-svn: 209000
* InstSimplify: Optimize using dividend in sdivDavid Majnemer2014-05-161-0/+9
| | | | | | | | | | | | | | | Summary: The dividend in an sdiv tells us the largest and smallest possible results. Use this fact to optimize comparisons against an sdiv with a constant dividend. Reviewers: nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3795 llvm-svn: 208999
* [yaml2obj][ELF] Add an optional `Size` field to the YAML section declaration.Simon Atanasyan2014-05-162-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the only method to configure ELF section's content and size is to assign a hexadecimal string to the `Content` field. Unfortunately this way is completely useless when you need to declare a really large section. To solve this problem this patch adds one more optional field `Size` to the `RawContentSection` structure. When yaml2obj generates an ELF file it uses the following algorithm: 1. If both `Content` and `Size` fields are missed create an empty section. 2. If only `Content` field is missed take section length from the `Size` field and fill the section by zero. 3. If only `Size` field is missed create a section using data from the `Content` field. 4. If both `Content` and `Size` fields are provided validate that the `Size` value is not less than size of `Content` data. Than take section length from the `Size`, fill beginning of the section by `Content` and the rest by zero. Examples -------- * Create a section 0x10000 bytes long filled by zero Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Size: 0x10000 * Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE' Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Content: CAFEBABE Size: 0x10000 The patch reviewed by Michael Spencer. llvm-svn: 208995
* Re-enable inline memcpy expansion for Thumb1.James Molloy2014-05-162-5/+60
| | | | | | Patch by Moritz Roth! llvm-svn: 208994
* Fix the Load/Store optimization pass to work with Thumb1.James Molloy2014-05-163-3/+48
| | | | | | Patch by Moritz Roth! llvm-svn: 208992
* [mips][mips64r6] Add SELEQZ and SELNEZ instructionsZoran Jovanovic2014-05-162-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3743 llvm-svn: 208987
* [mips][mips64r6] Add Compact indexed jumps.Zoran Jovanovic2014-05-162-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3707 llvm-svn: 208981
* Revert "Implement global merge optimization for global variables."Rafael Espindola2014-05-1610-295/+56
| | | | | | | | | | | | This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. llvm-svn: 208978
* [mips][mips64r6] Add Compact zero-compare branch-and-link instructionsZoran Jovanovic2014-05-162-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D3718 llvm-svn: 208977
* [mips][mips64r6] Add compact branch instructionsZoran Jovanovic2014-05-162-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D3691 llvm-svn: 208974
* [mips][mips64r6] Add LWPC and LWUPC instructionsZoran Jovanovic2014-05-162-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3788 llvm-svn: 208971
* [mips][mips64r6] Add Floating Point Compare setting Mask - CMP.condn.fmtZoran Jovanovic2014-05-162-0/+64
| | | | | | Differential Revision: http://reviews.llvm.org/D3750 llvm-svn: 208970
* TableGen: fix operand counting for aliasesTim Northover2014-05-1617-141/+111
| | | | | | | | | | | | | | | | | | | | | TableGen has a fairly dubious heuristic to decide whether an alias should be printed: does the alias have lest operands than the real instruction. This is bad enough (particularly with no way to override it), but it should at least be calculated consistently for both strings. This patch implements that logic: first get the *correct* string for the variant, in the same way as the Matcher, without guessing; then count the number of whitespace chars. There are basically 4 changes this brings about after the previous commits; all of these appear to be good, so I have changed the tests: + ARM64: we print "neg X, Y" instead of "sub X, xzr, Y". + ARM64: we skip implicit "uxtx" and "uxtw" modifiers. + Sparc: we print "mov A, B" instead of "or %g0, A, B". + Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B" llvm-svn: 208969
* [ARM64]Implement NEON post-increment LD1(lane) and post-increment LD1R.Hao Liu2014-05-161-1/+485
| | | | llvm-svn: 208955
* [mips][mips64r6] Add Floating Point Fused Multiply Add SubtractZoran Jovanovic2014-05-162-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D3727 llvm-svn: 208952
* ARM: add some integer/floating point conversion libcallsSaleem Abdulrasool2014-05-161-0/+74
| | | | | | | | Add some Windows on ARM specific library calls. These are provided by msvcrt, and can be used to perform integer to floating-point conversions (and vice-versa) mirroring similar functions in the RTABI. llvm-svn: 208949
* ProfileData: Allow multiple profiles in RawInstrProfReaderJustin Bogner2014-05-161-0/+64
| | | | | | | | | | | | | | | | | | | Allow multiple raw profiles to coexist in a single .profraw file, given the following conditions: - Zero padding at the end of or between profiles will be skipped. - Each profile must start with a valid header. - Mixing endianness or pointer sizes in concatenated profiles files is not allowed. This is needed to handle cases where a program's shared libraries are profiled as well as the main executable itself, as we'll need to emit each executable's counters. Combining the tables in the runtime would be expensive for the instrumented program. rdar://16918688 llvm-svn: 208938
* musttail: Fix the verification of alignment attributesReid Kleckner2014-05-151-0/+7
| | | | | | | Previously this would fail with an assertion failure when trying to add an alignment attribute without a value. llvm-svn: 208935
* Implement global merge optimization for global variables.Jiangning Liu2014-05-1510-56/+295
| | | | | | | | | | | This commit implements two command line switches -global-merge-on-external and -global-merge-aligned, and both of them are false by default, so this optimization is disabled by default for all targets. For ARM64, some back-end behaviors need to be tuned to get this optimization further enabled. llvm-svn: 208934
* DebugInfo: Don't put fission type units in comdat sections.David Blaikie2014-05-151-2/+18
| | | | | | | | | Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization. llvm-svn: 208930
* Finish materialize for intsReed Kotler2014-05-151-0/+65
| | | | | | | | | | | | | | Summary: We add code to materialize all integer literals. Test Plan: simplestorei.ll Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3596 llvm-svn: 208923
* Don't insert lifetime.end markers between a musttail call and retReid Kleckner2014-05-151-0/+36
| | | | | | | | | | | | | The allocas going out of scope are immediately killed by the return instruction. This is a resend of r208912, which was committed accidentally. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3792 llvm-svn: 208920
* Revert "Don't insert lifetime.end markers between a musttail call and ret"Reid Kleckner2014-05-151-36/+0
| | | | | | | | This reverts commit r208912. It was committed accidentally without review. llvm-svn: 208914
* Don't insert lifetime.end markers between a musttail call and retReid Kleckner2014-05-151-0/+36
| | | | | | | | | | | The allocas going out of scope are immediately killed by the return instruction. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3630 llvm-svn: 208912
* Teach the inliner how to preserve musttail invariantsReid Kleckner2014-05-151-9/+140
| | | | | | | | | | | | | | | | | | | | The interesting case is what happens when you inline a musttail call through a musttail call site. In this case, we can't break perfect forwarding or allow any stack growth. Instead of merging control flow from the inlined return instruction after a musttail call into the body of the caller, leave the inlined return instruction in the caller so that the musttail call stays in the tail position. More work is required in http://reviews.llvm.org/D3630 to handle the case where the inlined function has dynamic allocas or byval arguments. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3491 llvm-svn: 208910
* [obj2yaml][ELF] Print relocation's offset as a hex number. Use a properSimon Atanasyan2014-05-151-10/+10
| | | | | | types to hold relocation's offset and addend. llvm-svn: 208906
* [obj2yaml][ELF] Do not print empty Link and Info fields for ELF sections.Simon Atanasyan2014-05-151-26/+0
| | | | llvm-svn: 208905
* [ARM64] Improve diagnostics for Cn operands in SYS instructionsBradley Smith2014-05-151-1/+1
| | | | llvm-svn: 208902
* [yaml2obj] Add "-o" command line option to specify an output file name.Simon Atanasyan2014-05-152-0/+6
| | | | llvm-svn: 208900
* llvm/test/CodeGen/X86/combine-sse41-intrinsics.ll: Add explicit triple.NAKAMURA Takumi2014-05-151-1/+1
| | | | llvm-svn: 208897
* [X86] Teach the backend how to fold SSE4.1/AVX/AVX2 blend intrinsics.Andrea Di Biagio2014-05-153-0/+414
| | | | | | | | | | | | | Added target specific combine rules to fold blend intrinsics according to the following rules: 1) fold(blend A, A, Mask) -> A; 2) fold(blend A, B, <allZeros>) -> A; 3) fold(blend A, B, <allOnes>) -> B. Added two new tests to verify that the new folding rules work for all the optimized blend intrinsics. llvm-svn: 208895
* [mips][mips64r6] Add CLASS.fmt instructionsZoran Jovanovic2014-05-152-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3712 llvm-svn: 208894
* [mips][mips64r6] Add RINT.fmt instructionsZoran Jovanovic2014-05-152-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3711 llvm-svn: 208892
* [mips][mips64r6] Add SELEQZ/SELNEZ.fmt instructionsZoran Jovanovic2014-05-152-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D3710 llvm-svn: 208891
* [mips][mips64r6] Add MAX/MIN/MAXA/MINA.fmt instructionsZoran Jovanovic2014-05-152-0/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D3709 llvm-svn: 208890
* R600/SI: Only use SALU instructions for 64-bit add in a block of CF depth 0Tom Stellard2014-05-151-0/+25
| | | | llvm-svn: 208886
* R600/SI: Use VALU instructions for i1 opsTom Stellard2014-05-152-12/+36
| | | | llvm-svn: 208885
* [mips][mips64r6] Add bitswap, and dbitswapDaniel Sanders2014-05-152-0/+3
| | | | | | | | | | | | Summary: Depends on D3728 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3729 llvm-svn: 208877
* ARM64: print correct aliases for NEON mov & mvn instructionsTim Northover2014-05-1510-138/+138
| | | | | | | | In all cases, if a "mov" alias exists, it is the canonical form of the instruction. Now that TableGen can support aliases containing syntax variants, we can enable them and improve the quality of the asm output. llvm-svn: 208874
* [mips][mips64r6] Add align and dalignDaniel Sanders2014-05-152-0/+3
| | | | | | | | | | | | Summary: Depends on D3689 Reviewers: vmedic, zoran.jovanovic, jkolek Reviewed By: jkolek Differential Revision: http://reviews.llvm.org/D3728 llvm-svn: 208872
* TableGen/ARM64: print aliases even if they have syntax variants.Tim Northover2014-05-1510-57/+54
| | | | | | | To get at least one use of the change (and some actual tests) in with its commit, I've enabled the AArch64 & ARM64 NEON mov aliases. llvm-svn: 208867
* [ARM64] Improve load/store diagnostics and forbid 32-bit register addressesBradley Smith2014-05-151-4/+4
| | | | llvm-svn: 208864
* [ARM64] Add/Fixup diagnostics for floating point immediatesBradley Smith2014-05-151-5/+5
| | | | llvm-svn: 208862
OpenPOWER on IntegriCloud