summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* InstCombine: fold (A << C) == (B << C) --> ((A^B) & (~0U >> C)) == 0Benjamin Kramer2015-03-263-38/+45
| | | | | | | Anding and comparing with zero can be done in a single instruction on most archs so this is a bit cheaper. llvm-svn: 233291
* [AArch64, ARM] Add v8.1a architecture and generic cpuVladimir Sukharev2015-03-2616-7/+92
| | | | | | | | | | | | New architecture and cpu added, following http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development Reviewers: t.p.northover Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8505 llvm-svn: 233290
* Use SDValue bool checks; NFC intendedSanjay Patel2015-03-261-20/+13
| | | | llvm-svn: 233289
* fix indent; NFCSanjay Patel2015-03-261-1/+1
| | | | llvm-svn: 233288
* [SLSR] handle candidate form &B[i * S]Jingyue Wu2015-03-265-67/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch enhances SLSR to handle another candidate form &B[i * S]. If we found two candidates S1: X = &B[i * S] S2: Y = &B[i' * S] and S1 dominates S2, we can replace S2 with Y = &X[(i' - i) * S] Test Plan: slsr-gep.ll X86/no-slsr.ll: verify that we do not run SLSR on GEPs that already fit into an addressing mode Reviewers: eliben, atrick, meheff, hfinkel Reviewed By: hfinkel Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D7459 llvm-svn: 233286
* Sometimes report_fatal_error is called when there is not a handler function ↵Aaron Ballman2015-03-261-3/+17
| | | | | | used to fail gracefully. In that case, RunInterruptHandlers is called, which attempts to enter a critical section object. Ensure that the critical section is properly initialized so that this code functions properly, and tools like clang-tidy do not crash in Debug builds. llvm-svn: 233282
* [mips] Move the setATReg definition inside the MipsAssemblerOptions class. NFC.Toma Tabacu2015-03-261-9/+7
| | | | | | | | | | | | | | Summary: This groups all of the MipsAssemblerOptions functionality together, making it more reader-friendly. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8445 llvm-svn: 233271
* [X86][FastIsel] Teach how to select vector load instructions.Andrea Di Biagio2015-03-262-3/+219
| | | | | | | | | This patch teaches fast-isel how to select 128-bit vector load instructions. Added test CodeGen/X86/fast-isel-vecload.ll Differential Revision: http://reviews.llvm.org/D8605 llvm-svn: 233270
* Revert "Linker: Drop function pointers for overridden subprograms"Duncan P. N. Exon Smith2015-03-264-204/+16
| | | | | | | | | | | | This reverts commit r233164 and its testcase follow-ups in r233165, r233207, r233214, and r233221. It apparently unleashed an LTO bootstrap failure, at least on Darwin: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/3376/ I'm reproducing now. llvm-svn: 233254
* bugpoint: Verify input filesDuncan P. N. Exon Smith2015-03-262-4/+10
| | | | | | Like r233229 for `llvm-link`, start verifying input files to `bugpoint`. llvm-svn: 233253
* bugpoint: Return early after error, NFCDuncan P. N. Exon Smith2015-03-261-10/+10
| | | | llvm-svn: 233252
* [RegisterCoalescer] Add a rule to consider more profitable copies first whenQuentin Colombet2015-03-262-2/+73
| | | | | | | | | | | those are in the same basic block. The previous approach was the topological order of the basic block. By default this rule is disabled. Related to PR22768. llvm-svn: 233241
* Testcase for r233239.Eric Christopher2015-03-261-0/+32
| | | | llvm-svn: 233240
* Add computeFSAdditions to the function based subtarget creationEric Christopher2015-03-261-1/+9
| | | | | | | | | for PPC due to some unfortunate default setting via TargetMachine creation. I've added a FIXME on how this can be unraveled in the backend and a test to make sure we successfully legalize 64-bit things if we say we're 64-bits. llvm-svn: 233239
* llvm-link: Verify input modulesDuncan P. N. Exon Smith2015-03-256-237/+18
| | | | | | | | | | Otherwise, broken input modules can cause assertions. I've updated two of the testcases that started failing (modules that had `Require` flags but didn't meet their own requirements), but Rafael and I decided that test/Linker/2011-08-22-ResolveAlias.ll should just be deleted outright -- it's a leftover of the way llvm-gcc used to implement weakref. llvm-svn: 233229
* Fix typo in comment.Nico Weber2015-03-251-1/+1
| | | | llvm-svn: 233226
* [ValueTracking] Fix PR23011.Sanjoy Das2015-03-252-7/+31
| | | | | | | | | | | | | | Summary: `ComputeNumSignBits` returns incorrect results for `srem` instructions. This change fixes the issue and adds a test case. Reviewers: nadav, nicholas, atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8600 llvm-svn: 233225
* [DAGCombiner] Add support for TRUNCATE + FP_EXTEND vector constant foldingSimon Pilgrim2015-03-255-55/+83
| | | | | | | | | | This patch adds supports for the vector constant folding of TRUNCATE and FP_EXTEND instructions and tidies up the SINT_TO_FP and UINT_TO_FP instructions to match. It also moves the vector constant folding for the FNEG and FABS instructions to use the DAG.getNode() functionality like the other unary instructions. Differential Revision: http://reviews.llvm.org/D8593 llvm-svn: 233224
* Linker: Stop using -gmlt test/Linker/subprogram-linkonce-weak.llDuncan P. N. Exon Smith2015-03-252-23/+36
| | | | | | | | | | | | | | | | | | As dblaikie pointed out, if I stop setting `emissionKind: 2` then the backend won't do magical things on Linux vs. Darwin. I had wrongly assumed that there were stricter requirements on the input if we weren't in line-tables-only mode, but apparently not. With that knowledge, clean up this testcase a little more. - Set `emissionKind: 1`. - Add back checks for the weak version of @foo. - Check more robustly that we have the right subprograms by checking the `DW_AT_decl_file` and `DW_AT_decl_line` which now show up. - Check the line table in isolation (since it's no longer doubling as an indirect test for the subprogram of the weak version of @foo). llvm-svn: 233221
* Fix remaining MSVC warningAndrew Kaylor2015-03-251-2/+2
| | | | llvm-svn: 233220
* RegisterCoalescer: Fix implicit def handling in register coalescerMatthias Braun2015-03-251-1/+23
| | | | | | | | | | | | | | | | If liveranges induced by an IMPLICIT_DEF get completely covered by a proper liverange the IMPLICIT_DEF instructions and its corresponding definitions have to be removed from the live ranges. This has to happen in the subregister live ranges as well (I didn't see this case earlier because in most programs only some subregisters are covered and the IMPLCIT_DEF won't get removed). No testcase, I spent hours trying to create one for one of the public targets, but ultimately failed because I couldn't manage to properly control the placement of COPY and IMPLICIT_DEF instructions from an .ll file. llvm-svn: 233217
* MachineVerifier: slightly simplify code that is only called with vregsMatthias Braun2015-03-251-30/+25
| | | | llvm-svn: 233216
* Linker: Loosen checks slightly from r233207Duncan P. N. Exon Smith2015-03-251-4/+4
| | | | | | | According to at least one bot [1], function prologues aren't always empty for these functions. Skip that part of the follow-up check. llvm-svn: 233214
* Revert r233206Krzysztof Parzyszek2015-03-251-3/+0
| | | | llvm-svn: 233213
* WinEH: Create an unwind help alloca for __CxxFrameHandler3 xdata tablesReid Kleckner2015-03-256-0/+49
| | | | | | | | We don't have any logic to emit those tables yet, so the sdag lowering of this intrinsic is just a stub. We can see the intrinsic in the prepared IR, though. llvm-svn: 233209
* Linker: Rewrite dwarfdump checks from r233164Duncan P. N. Exon Smith2015-03-252-20/+35
| | | | | | | | | | | | | | | | | | | | | | | Rewrite the checks from r233164 that I temporarily disabled in r233165. It turns out that the line-tables only debug info we emit from `llc` is (intentionally) different on Linux than on Darwin. r218129 started skipping emission of subprograms with no inlined subroutines, and r218702 was a spiritual revert of that behaviour for Darwin. I think we can still test this in a platform-neutral way. - Stop checking for the possibly missing `DW_TAG_subprogram` defining the debug info for the real version of `@foo`. - Start checking the line tables, ensuring that the right debug info was used to generate them (grabbing `DW_AT_low_pc` from the compile unit). - I changed up the line numbers used in the "weak" version so it's easier to follow. This should hopefully finish off PR22792. llvm-svn: 233207
* [Hexagon] Keep the bare getSubtargetImpl for nowKrzysztof Parzyszek2015-03-251-0/+3
| | | | llvm-svn: 233206
* Add Hardware Transactional Memory (HTM) SupportKit Barton2015-03-2519-32/+597
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds Hardware Transaction Memory (HTM) support supported by ISA 2.07 (POWER8). The intrinsic support is based on GCC one [1], but currently only the 'PowerPC HTM Low Level Built-in Function' are implemented. The HTM instructions follows the RC ones and the transaction initiation result is set on RC0 (with exception of tcheck). Currently approach is to create a register copy from CR0 to GPR and comapring. Although this is suboptimal, since the branch could be taken directly by comparing the CR0 value, it generates code correctly on both test and branch and just return value. A possible future optimization could be elimitate the MFCR instruction to branch directly. The HTM usage requires a recently newer kernel with PPC HTM enabled. Tested on powerpc64 and powerpc64le. This is send along a clang patch to enabled the builtins and option switch. [1] https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html Phabricator Review: http://reviews.llvm.org/D8247 llvm-svn: 233204
* clang-format bits of code to make another patch readable.Rafael Espindola2015-03-253-28/+18
| | | | llvm-svn: 233203
* Simplify missing-file-line.ll test.Peter Collingbourne2015-03-251-18/+14
| | | | llvm-svn: 233201
* DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags ↵Peter Collingbourne2015-03-252-1/+64
| | | | | | | | | | | | | | | | | with empty file names. Some languages, such as Go, have pre-defined structure types (e.g. "string" is essentially a pointer/length pair) or pre-defined "typedef" types (e.g. "error" is essentially a typedef for a specific interface type). Such types do not have associated source location, so a Go frontend would be correct not to associate a file name with such types. This change relaxes the DIType verifier to permit unlocated types with these tags. Differential Revision: http://reviews.llvm.org/D8588 llvm-svn: 233200
* [X86, AVX] improve insertion into zero element of 256-bit vectorSanjay Patel2015-03-252-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows AVX blend instructions to handle insertion into the low element of a 256-bit vector for the appropriate data types. For f32, instead of: vblendps $1, %xmm1, %xmm0, %xmm1 ## xmm1 = xmm1[0],xmm0[1,2,3] vblendps $15, %ymm1, %ymm0, %ymm0 ## ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7] we get: vblendps $1, %ymm1, %ymm0, %ymm0 ## ymm0 = ymm1[0],ymm0[1,2,3,4,5,6,7] For f64, instead of: vmovsd %xmm1, %xmm0, %xmm1 ## xmm1 = xmm1[0],xmm0[1] vblendpd $3, %ymm1, %ymm0, %ymm0 ## ymm0 = ymm1[0,1],ymm0[2,3] we get: vblendpd $1, %ymm1, %ymm0, %ymm0 ## ymm0 = ymm1[0],ymm0[1,2,3] For the hardware-neglected integer data types, I left a TODO comment in the code and added regression tests for a follow-on patch. Differential Revision: http://reviews.llvm.org/D8609 llvm-svn: 233199
* use update_llc_test_checks.py to tighten checking in these testsSanjay Patel2015-03-251-19/+91
| | | | | | | | 1. There were no CHECK-LABELs, so we could match instructions from the wrong function. 2. The use of zero operands meant multiple xor instructions could match some CHECKs. 3. The test was over-specified to need a Sandybridge CPU and Darwin triple. llvm-svn: 233198
* llvm-jitlistener: Add missing include.Benjamin Kramer2015-03-251-1/+2
| | | | | | | This code is only compiled when LLVM_USE_INTEL_JITEVENTS, but at least we have one buildbot where that's the case :) llvm-svn: 233197
* [APInt] Add an isSplat helper and use it in some places.Benjamin Kramer2015-03-255-14/+60
| | | | | | | To complement getSplat. This is more general than the binary decomposition method as it also handles non-pow2 splat sizes. llvm-svn: 233195
* [Hexagon] Pattern match a CTZ loop into a call to countTrailingZeros.Benjamin Kramer2015-03-251-4/+1
| | | | | | No functional change intended. llvm-svn: 233192
* [ARM] Rewrite .save/.vsave emission with bit mathBenjamin Kramer2015-03-251-51/+21
| | | | | | | Hopefully makes it a bit easier to understand what's going on. No functional change intended. llvm-svn: 233191
* Make exit-code test use same mechanism as existing one.Daniel Jasper2015-03-251-1/+2
| | | | | | | The other version doesn't properly work with our internal test runner, which sets pipefail. llvm-svn: 233188
* Fix fixup evaluation when deciding what to relocate with.Rafael Espindola2015-03-257-66/+61
| | | | | | | | | | | | | | The previous logic was to first try without relocations at all and failing that stop on the first defined symbol. That was inefficient and incorrect in the case part of the expression could be simplified and another part could not (see included test). We now stop the evaluation when we get to a variable whose value can change (i.e. is weak). llvm-svn: 233187
* [Orc] Remove another unnecessary typedef.Lang Hames2015-03-251-1/+1
| | | | llvm-svn: 233184
* [optnone] Skip pass Float2Int on optnone functions.Andrea Di Biagio2015-03-252-0/+20
| | | | | | | Added test Float2Int/float2int-optnone.ll to verify that pass Float2Int is not run on optnone functions. llvm-svn: 233183
* [Orc][lli] Add a very simple Orc-based lazy JIT to lli.Lang Hames2015-03-25103-154/+346
| | | | | | | | | | | | | | | | | This ensures that we're building and testing the CompileOnDemand layer, at least in a basic way. Currently x86-64 only, and with limited to no library calls enabled (depending on host platform). Patches welcome. ;) To enable access to the lazy JIT, this patch replaces the '-use-orcmcjit' lli option with a new option: '-jit-kind={ mcjit | orc-mcjit | orc-lazy }'. All regression tests are updated to use the new option, and one trivial test of the new lazy JIT is added. llvm-svn: 233182
* [X86] Simplify check lines in tests. No functional change.Andrea Di Biagio2015-03-252-197/+91
| | | | | | Also, removed unused check lines from test atomic6432.ll. llvm-svn: 233181
* Reapply r233062: "float2int": Add a new pass to demote from float to int ↵James Molloy2015-03-259-1/+812
| | | | | | | | where possible. Now with a fix for PR23008 and extra regression test. llvm-svn: 233175
* test: Fix the dependencies for the check-llvm-* targetsJustin Bogner2015-03-252-5/+6
| | | | | | | | | | | | | In r233009 we gained specific check-llvm-* build targets for invoking specific parts of the test suite, but they were copying the dependencies for check-all, rather than just listing the dependencies for check-llvm. This moves the creation of these targets next to the check-llvm target, and uses that target's configuration rather than the check-all config. llvm-svn: 233174
* Fix build.Rafael Espindola2015-03-251-1/+1
| | | | llvm-svn: 233171
* [X86] Remove GetCpuIDAndInfo, GetCpuIDAndInfoEx and DetectFamilyModel ↵Craig Topper2015-03-252-149/+0
| | | | | | functions from X86 MC layer. They haven't been used since CPU autodetection was removed from X86Subtarget.cpp. llvm-svn: 233170
* [Orc] Remove extraneous 'typename'. This should cheer the bots up.Lang Hames2015-03-251-1/+1
| | | | llvm-svn: 233168
* [Orc] Refactor JITCompileCallbackManagerBase and CompileOnDemandLayer to supportLang Hames2015-03-254-61/+60
| | | | | | | | target-independent callback management. This is a prerequisite for adding orc-based lazy-jitting to lli. llvm-svn: 233166
* Linker: Temporarily disable dwarfdump checks from r233164Duncan P. N. Exon Smith2015-03-251-2/+5
| | | | | | | | | | At least one Linux bot [1] doesn't like my dwarfdump checks, so I've disable those until I can investigate what's going on there. I'll continue to track this in PR22792. [1]: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/22863 llvm-svn: 233165
OpenPOWER on IntegriCloud