summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix for a regression caused by the LoopVectorizer whenPekka Jaaskelainen2013-06-171-0/+47
| | | | | | | vectorizing loops with memory accesses to non-zero address spaces. It simply dropped the AS info. Fixes PR16306. llvm-svn: 184103
* Add a testcase for r184074.Rafael Espindola2013-06-172-0/+23
| | | | llvm-svn: 184080
* AArch64: print relocation addends if present on AArch64Tim Northover2013-06-171-0/+8
| | | | | | | llvm-objdump should provide some way of printing out the addends present in the .rela sections for debugging purposes if nothing else. llvm-svn: 184072
* Debug Info: Simplify Frame Index handling in DBG_VALUE Machine InstructionsDavid Blaikie2013-06-162-2/+2
| | | | | | | | | | | | | | | | | | | | Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
* DebugInfo: follow up to 184045 to constrain the tests further to ensure they ↵David Blaikie2013-06-154-5/+5
| | | | | | don't contain +0 offsets llvm-svn: 184046
* DebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the ↵David Blaikie2013-06-155-6/+6
| | | | | | offset when it's zero llvm-svn: 184045
* Machine Model: Add MicroOpBufferSize and resource BufferSize.Andrew Trick2013-06-153-12/+14
| | | | | | | | | | | | | Replace the ill-defined MinLatency and ILPWindow properties with with straightforward buffer sizes: MCSchedMode::MicroOpBufferSize MCProcResourceDesc::BufferSize These can be used to more precisely model instruction execution if desired. Disabled some misched tests temporarily. They'll be reenabled in a few commits. llvm-svn: 184032
* Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE ↵David Blaikie2013-06-151-1/+1
| | | | | | comments if the display name is empty llvm-svn: 184026
* [yaml2obj] Add support for sh_link via `Link` key.Sean Silva2013-06-151-0/+3
| | | | llvm-svn: 184022
* R600: Add SI load support for v[24]i32 and store for v2i32Tom Stellard2013-06-151-0/+19
| | | | | | | | | | | Also add a seperate vector lit test file, since r600 doesn't seem to handle v2i32 load/store yet, but we can test both for SI. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> llvm-svn: 184021
* Remove the LLVM specific archive index.Rafael Espindola2013-06-142-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Archive files (.a) can have a symbol table indicating which object files in them define which symbols. The purpose of this symbol table is to speed up linking by allowing the linker the read only the .o files it is actually going to use instead of having to parse every object's symbol table. LLVM's archive library currently supports a LLVM specific format for such table. It is hard to see any value in that now that llvm-ld is gone: * System linkers don't use it: GNU ar uses the same plugin as the linker to create archive files with a regular index. The OS X ar creates no symbol table for IL files, I assume the linker just parses all IL files. * It doesn't interact well with archives having both IL and native objects. * We probably don't want to be responsible for yet another archive format variant. This patch then: * Removes support for creating and reading such index from lib/Archive. * Remove llvm-ranlib, since there is nothing left for it to do. We should in the future add support for regular indexes to llvm-ar for both native and IL objects. When we do that, llvm-ranlib should be reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s". llvm-svn: 184019
* R600: Use correct encoding for Vertex Fetch instructions on CaymanTom Stellard2013-06-141-0/+25
| | | | | Reviewed-by: Vincent Lejeune<vljn at ovi.com> llvm-svn: 184016
* R600: Use EXPORT_RAT_INST_STORE_DWORD for stores on CaymanTom Stellard2013-06-141-0/+3
| | | | | | | | | We were using RAT_INST_STORE_RAW, which seemed to work, but the docs say this instruction doesn't exist for Cayman, so it's probably safer to use a documented instruction instead. Reviewed-by: Vincent Lejeune<vljn at ovi.com> llvm-svn: 184015
* Mark rematerialized super/sub registers as dead.Tim Northover2013-06-141-0/+23
| | | | | | | | | | | | | When we're rematerializing into a not-quite-right register we already add the real definition as an imp-def, but we should also be marking the "official" register as dead, since nothing else is going to use it as a result of this remat. Not doing this can affect pressure tracking. rdar://problem/14158833 llvm-svn: 184002
* Fix frame pointer debug information testJF Bastien2013-06-141-2/+2
| | | | | | Run the test at O1 instead of O0: ARM FastISel keeps frame pointers around and ignores the flag. The test should now pass on ARM and still passes on x86.See: http://llvm.org/bugs/show_bug.cgi?id=16322 llvm-svn: 183999
* Do not to perform RUN line substitution of llc if that's prefixed by a hypnenEli Bendersky2013-06-141-3/+9
| | | | | | | | | (-llc), similarly to the way it was done for clang and llvmc. This doesn't affect the upstream llvm tests but helps when developing custom LLVM-based tools and testing them within the LLVM regression framework. llvm-svn: 183994
* SelectionDAG: Fix incorrect condition checks in some cases of folding ↵Stephen Lin2013-06-141-4/+73
| | | | | | FADD/FMUL combinations; also improve accuracy of comments llvm-svn: 183993
* Make PrologEpilogInserter save/restore all callee saved registersDerek Schuff2013-06-142-0/+54
| | | | | | | | | | | in functions which call __builtin_unwind_init() __builtin_unwind_init() is an undocumented gcc intrinsic which has this effect, and is used in libgcc_eh. Goes part of the way toward fixing PR8541. llvm-svn: 183984
* ARM: fix thumb coprocessor instruction with pre-writeback disassemblyAmaury de la Vieuville2013-06-141-0/+3
| | | | | | | was stc2 p0, c0, [r0]! instead of stc2 p0, c0, [r0,#0]! llvm-svn: 183975
* X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX ↵Benjamin Kramer2013-06-141-0/+8
| | | | | | | | equivalent. Give it the right register format so we can also emit it when AVX is enabled. llvm-svn: 183971
* Enable FastISel on ARM for Linux and NaCl, not MCJITJF Bastien2013-06-1425-12/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a resubmit of r182877, which was reverted because it broken MCJIT tests on ARM. The patch leaves MCJIT on ARM as it was before: only enabled for iOS. I've CC'ed people from the original review and revert. FastISel was only enabled for iOS ARM and Thumb2, this patch enables it for ARM (not Thumb2) on Linux and NaCl, but not MCJIT. Thumb2 support needs a bit more work, mainly around register class restrictions. The patch punts to SelectionDAG when doing TLS relocation on non-Darwin targets. I will fix this and other FastISel-to-SelectionDAG failures in a separate patch. The patch also forces FastISel to retain frame pointers: iOS always keeps them for backtracking (so emitted code won't change because of this), but Linux was getting much worse code that was incorrect when using big frames (such as test-suite's lencod). I'll also fix this in a later patch, it will probably require a peephole so that FastISel doesn't rematerialize frame pointers back-to-back. The test changes are straightforward, similar to: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html They also add a vararg test that got dropped in that change. I ran all of lnt test-suite on A15 hardware with --optimize-option=-O0 and all the tests pass. All the tests also pass on x86 make check-all. I also re-ran the check-all tests that failed on ARM, and they all seem to pass. llvm-svn: 183966
* [yaml2obj] Add support for sh_addralign via `AddressAlign` key.Sean Silva2013-06-141-2/+4
| | | | | | | For consistency, change the address in the test case from 0xDEADBEEF to 0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment. llvm-svn: 183962
* [yaml2obj] Add support for specifying raw section content.Sean Silva2013-06-131-1/+6
| | | | llvm-svn: 183955
* [yaml2obj] Add sh_addr via `Address` key.Sean Silva2013-06-131-0/+2
| | | | llvm-svn: 183954
* [yaml2obj] Initial ELF section support.Sean Silva2013-06-132-1/+24
| | | | | | | The current functionality is extremely basic and a bit rough around the edges, but it will flesh out in future commits. llvm-svn: 183953
* [PowerPC] Disable fast-isel for existing -O0 tests for PowerPC.Bill Schmidt2013-06-1310-34/+31
| | | | | | | | | | | | | | | | | | | | | | | | This is a preliminary patch for fast instruction selection on PowerPC. Code generation can differ between DAG isel and fast isel. Existing tests that specify -O0 were written to expect DAG isel. Make this explicit by adding -fast-isel=false to the tests. In some cases specifying -fast-isel=false produces different code even when there isn't a fast instruction selector specified. This is because TM.Options.EnableFastISel = 1 at -O0 whether or not a FastISel object exists. Thus disabling fast isel can actually produce less conservative code. Because of this, some of the expected code generation in the -O0 tests needs to be adjusted. In particular, handling of function arguments is less conservative with -fast-isel=false (see isOnlyUsedInEntryBlock() in SelectionDAGBuilder.cpp). This results in fewer stack accesses and, in some cases, reduced stack size as uselessly loaded values are no longer stored back to spill locations in the stack. No functional change with this patch; test case adjustments only. llvm-svn: 183939
* Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddressesDerek Schuff2013-06-131-0/+25
| | | | | | | | | | | | | | | This pass was assuming that if hasAddressTaken() returns false for a function, the function's only uses are call sites. That's not true because there can be references by BlockAddresses too. Fix the pass to handle this case. Fix BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type to be changed by RAUW'ing the function with a bitcast of the recreated function. Patch by Mark Seaborn. llvm-svn: 183933
* ARM: fix B decodingAmaury de la Vieuville2013-06-131-0/+2
| | | | llvm-svn: 183914
* ARM: fix t2am_imm8_offset operand printing for imm=#-0Amaury de la Vieuville2013-06-131-0/+2
| | | | llvm-svn: 183913
* X86: Make the cmov aliases work with intel syntax too.Benjamin Kramer2013-06-131-0/+29
| | | | llvm-svn: 183907
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-122-0/+51
| | | | | | | | | | | | These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 llvm-svn: 183852
* Always remove an alias when we rename the target.Rafael Espindola2013-06-121-1/+12
| | | | | | Should fix the dragonegg build bots. llvm-svn: 183845
* Convert test to FileCheck.Rafael Espindola2013-06-121-9/+17
| | | | llvm-svn: 183843
* [MC/DWARF] Support .debug_frame / .debug_line code alignment factorsUlrich Weigand2013-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | I've been comparing the object file output of LLVM's integrated assembler against the external assembler on PowerPC, and one area where differences still remain are in DWARF sections. In particular, the GNU assembler generates .debug_frame and .debug_line sections using a code alignment factor of 4, since all PowerPC instructions have size 4 and must be aligned to a multiple of 4. However, current MC code hard-codes a code alignment factor of 1. This patch changes this by adding a "minimum instruction alignment" data element to MCAsmInfo and using this as code alignment factor. This requires passing a MCContext into MCDwarfLineAddr::Encode and MCDwarfLineAddr::EncodeAdvanceLoc. Note that one caller, MCDwarfLineAddr::Write, didn't actually have that information available. However, it turns out that this routine is in fact never used in the whole code base, so the patch simply removes it. If it turns out to be needed again at a later time, it could be re-added with an updated interface. llvm-svn: 183834
* [PowerPC] Use assembler source in MC testsUlrich Weigand2013-06-126-155/+152
| | | | | | | | | | | A couple of old test cases in test/MC/PowerPC were still using LLVM IR. Now that we have a working assembler, we can move them to assembler tests instead: ppc64-initial-cfa.ll ppc64-relocs-01.ll ppc64-tls-relocs-01.ll llvm-svn: 183829
* [yaml2obj] Remove fragile test case.Sean Silva2013-06-122-39/+0
| | | | | | | | | | This test case was a "sanity check"/"breathing" test case at first, but is really fragile, which impairs changes to yaml2obj. `test/Object/yaml2obj-elf-bits-endian.test` is much more robust and serves as an adequate sanity check. llvm-svn: 183811
* [mips] Add an IR transformation pass that optimizes calls to sqrt.Akira Hatanaka2013-06-111-0/+32
| | | | | | | | | The pass emits a call to sqrt that has attribute "read-none". This call will be converted to an ISD::FSQRT node during DAG construction, which will turn into a mips native sqrt instruction. llvm-svn: 183802
* Change how globalopt handles aliases in llvm.used.Rafael Espindola2013-06-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Instead of a custom implementation of replaceAllUsesWith, we just call replaceAllUsesWith and recreate llvm.used and llvm.compiler-used. This change is particularity interesting because it makes llvm see through what clang is doing with static used functions in extern "C" contexts. With this change, running clang -O2 in extern "C" { __attribute__((used)) static void foo() {} } produces @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata" define internal void @foo() #0 { entry: ret void } llvm-svn: 183756
* Rework r183728, suppress assert(0) for now. Its behavior depends on ↵NAKAMURA Takumi2013-06-112-6/+0
| | | | | | | assertions on win32 hosts. FIXME: Introduce yet another checker but assert(0). llvm-svn: 183736
* It adds support for negative zero offsets for loads and stores.Mihai Popa2013-06-111-1/+4
| | | | | | | Negative zero is returned by the primary expression parser as INT32_MIN, so all that the method needs to do is to accept this value. Behavior already present for Thumb2. llvm-svn: 183734
* This patch adds support for FPINST/FPINST2 as operands to vmsr/vmrs. These ↵Mihai Popa2013-06-112-2/+18
| | | | | | are optional registers that may be supported some ARM implementations to aid with resolution of floating point exceptions. The manual pages for vmsr and vmrs do not detail their use. Encodings and other information can be found in ARM Architecture Reference Manual section F, chapter 6, paragraph 3. llvm-svn: 183733
* ARM: Enforce decoding rules for VLDn instructionsAmaury de la Vieuville2013-06-113-38/+62
| | | | llvm-svn: 183731
* ARM: Fix STREX/LDREX reecodingAmaury de la Vieuville2013-06-112-0/+28
| | | | | | The decoded MCInst wasn't reencoded as the same instruction llvm-svn: 183729
* Tweak a couple of tests on win32 hosts with +Asserts.NAKAMURA Takumi2013-06-112-0/+6
| | | | | | | | - Don't use assert(0), or tests may pass or fail according to assertions. - For now, The tests are marked as XFAIL for win32 hosts. FIXME: Could we avoid XFAIL to specify triple in the RUN lines? llvm-svn: 183728
* Fix dubious type name similar to member name.Sean Silva2013-06-115-5/+5
| | | | | | Should bring bots back to life. llvm-svn: 183715
* [yaml2obj] Initial ELF support.Sean Silva2013-06-107-0/+79
| | | | | | | | | Currently, only emitting the ELF header is supported (no sections or segments). The ELFYAML code organization is broadly similar to the COFFYAML code. llvm-svn: 183711
* ARM: diagnose ARM/Thumb assembly switches on CPUs only supporting one.Tim Northover2013-06-105-3/+36
| | | | | | | | | | | Some ARM CPUs only support ARM mode (ancient v4 ones, for example) and some only support Thumb mode (M-class ones currently). This makes sure such CPUs default to the correct mode and makes the AsmParser diagnose an attempt to switch modes incorrectly. rdar://14024354 llvm-svn: 183710
* X86: Stop LEA64_32r doing unspeakable things to its arguments.Tim Northover2013-06-103-6/+8
| | | | | | | | | | | | Previously LEA64_32r went through virtually the entire backend thinking it was using 32-bit registers until its blissful illusions were cruelly snatched away by MCInstLower and 64-bit equivalents were substituted at the last minute. This patch makes it behave normally, and take 64-bit registers as sources all the way through. Previous uses (for 32-bit arithmetic) are accommodated via SUBREG_TO_REG instructions which make the types and classes agree properly. llvm-svn: 183693
* [PowerPC] Support extended sc mnemonicUlrich Weigand2013-06-101-0/+2
| | | | | | | | | A plain "sc" without argument is supposed to be treated like "sc 0" by the assembler. This patch adds a corresponding alias. Problem reported by Joerg Sonnenberger. llvm-svn: 183687
* [PowerPC] Support branch mnemonics with implied CR0Ulrich Weigand2013-06-101-1/+197
| | | | | | | | | | The extended branch mnemonics are supposed to use an implied CR0 if there is no explicit condition register specified. This patch adds extra variants of the mnemonics to this effect. Problem reported by Joerg Sonnenberger. llvm-svn: 183686
OpenPOWER on IntegriCloud