summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the code that checks that all operands of a node are UNDEFs.Nadav Rotem2012-07-153-13/+32
| | | | | | | | | Add a micro-optimization to getNode of CONCAT_VECTORS when both operands are undefs. Can't find a testcase for this because VECTOR_SHUFFLE already handles undef operands, but Duncan suggested that we add this. Together with Michael Kuperstein <michael.m.kuperstein@intel.com> llvm-svn: 160229
* Reapply r160194, switching to use LV information for finding local kills.Chandler Carruth2012-07-151-56/+32
| | | | | | | | | | | | | | | | | | | | | The notable fix is to look at any dependencies attached to the kill instruction (or other instructions between MI nad the kill) where the dependencies are specific to the register in question. The old code implicitly handled this by rejecting the transform if *any* other uses were found within the block, but after the start point. The new code directly finds the kill, and has to re-use the existing dependency scan to check for non-kill uses. This was caught by self-host, but I found the bug via inspection and use of absurd assert scaffolding to compute the kills in two ways and compare them. So I have no useful testcase for this other than "bootstrap". I'd work harder to reduce a test case if this particular code were likely to live for a long time. Thanks to Benjamin Kramer for reviewing the fix itself. llvm-svn: 160228
* Move IsSameValue from clang's ASTImporter to be methods on theEric Christopher2012-07-152-0/+39
| | | | | | | | APInt/APSInt classes. Part of rdar://11875995 llvm-svn: 160223
* AVX: Fix a bug in getTargetVShiftNode. The shift amount has to be a 128bit ↵Nadav Rotem2012-07-142-1/+38
| | | | | | | | vector with the same element type as the input vector. This is needed because of the patterns we have for the VP[SLL/SRA/SRL][W/D/Q] instructions. llvm-svn: 160222
* Add a dagcombine optimization to convert concat_vectors of undefs into a ↵Nadav Rotem2012-07-142-0/+28
| | | | | | | | single undef. The unoptimized concat_vectors isd prevented the canonicalization of the vector_shuffle node. llvm-svn: 160221
* Account for early-clobber reload instructions.Jakob Stoklund Olesen2012-07-141-0/+4
| | | | | | No test case, there are no in-tree targets that require this. llvm-svn: 160219
* Be more verbose when detecting dominance problems.Jakob Stoklund Olesen2012-07-132-7/+29
| | | | | | | | | | Catch uses of undefined physregs that haven't been added to basic block live-in lists. Run the verifier to pinpoint the problem. Also run the verifier when a virtual register use is not jointly dominated by defs. llvm-svn: 160207
* LSR Fix: check SCEV expression safety before expansion.Andrew Trick2012-07-134-1/+136
| | | | | | | | | | All SCEV expressions used by LSR formulae must be safe to expand. i.e. they may not contain UDiv unless we can prove nonzero denominator. Fixes PR11356: LSR hoists UDiv. llvm-svn: 160205
* IVUsers should only generate SCEV's for values that are safe to speculate.Andrew Trick2012-07-131-0/+7
| | | | | | | | | | This allows SCEVExpander to run on the IV expressions. This codifies an assumption made by LSR to complete the fix for PR11356, but I haven't been able to generate a separate unit test for this part. I'm adding it as an extra safety check. llvm-svn: 160204
* Factor SCEV traversal code so I can use it elsewhere. No functionality.Andrew Trick2012-07-132-51/+86
| | | | llvm-svn: 160203
* This is one of the first steps at moving to replace target-dependent Joel Jones2012-07-134-19/+57
| | | | | | | | | | | | | | | | | | | | intrinsics with target-indepdent intrinsics. The first instruction(s) to be handled are the vector versions of count leading zeros (ctlz). The changes here are to clang so that it generates a target independent vector ctlz when it sees an ARM dependent vector ctlz. The changes in llvm are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM dependent vector ctlzs with target-independent ctlzs. There are also changes to an existing test case in llvm for ARM vector count instructions and a new test for the bitcode upgrade. <rdar://problem/11831778> There is deliberately no test for the change to clang, as so far as I know, no consensus has been reached regarding how to test neon instructions in clang; q.v. <rdar://problem/8762292> llvm-svn: 160200
* Revert r160194, which switched to use LV information for finding localChandler Carruth2012-07-131-19/+54
| | | | | | | | kills. This is causing miscompiles that I'm working on tracking down. llvm-svn: 160196
* Use the LiveVariables information to efficiently get local kills. ThisChandler Carruth2012-07-131-54/+19
| | | | | | | | | | removes the largest scaling problem in the test cases from PR13225 when ASan is switched to insert basic blocks in the natural CFG order. It may also solve some scaling problems for more normal code with large numbers of basic blocks and variables. llvm-svn: 160194
* Fixed few warnings.Galina Kistanova2012-07-131-2/+2
| | | | llvm-svn: 160192
* Remove variable_ops from call instructions in most targets.Jakob Stoklund Olesen2012-07-1311-46/+44
| | | | | | | | Call instructions are no longer required to be variadic, and variable_ops should only be used for instructions that encode a variable number of arguments, like the ARM stm/ldm instructions. llvm-svn: 160189
* Remove variable_ops from ARM call instructions.Jakob Stoklund Olesen2012-07-133-22/+19
| | | | | | | | | | | | Function argument registers are added to the call SDNode, but InstrEmitter now knows how to make those operands implicit, and the call instruction doesn't have to be variadic. Explicit register operands should only be those that are encoded in the instruction, implicit register operands are for extra dependencies like call argument and return values. llvm-svn: 160188
* The Mips specific relocation R_MIPS_GOT_DISP Jack Carter2012-07-135-4/+30
| | | | | | | | | | is used in cases where global symbols are directly represented in the GOT and we use an offset into the global offset table. This patch adds direct object support for R_MIPS_GOT_DISP. llvm-svn: 160183
* test case for revision 160084: Alignment filling between Mips function unitsJack Carter2012-07-131-0/+23
| | | | llvm-svn: 160177
* Make helper functions static.Benjamin Kramer2012-07-132-2/+2
| | | | llvm-svn: 160173
* Initializers for some fields were missing in Option::OptionAlexander Kornienko2012-07-131-4/+4
| | | | llvm-svn: 160170
* ReleaseNotes.html: add note about specifying TLS modelsHans Wennborg2012-07-131-0/+2
| | | | llvm-svn: 160168
* Post-dom frontier was removed in 3.0. Patch by chenwj.Duncan Sands2012-07-131-1/+0
| | | | llvm-svn: 160166
* Restrict this to x86, hopefully fixing ARM buildbots.Duncan Sands2012-07-131-1/+1
| | | | llvm-svn: 160163
* Mark VINSERTI128rm as MayLoad=1. Fixes PR13348.Craig Topper2012-07-131-2/+2
| | | | llvm-svn: 160162
* Fixed few warnings; trimmed empty lines.Galina Kistanova2012-07-131-123/+151
| | | | llvm-svn: 160159
* Provide function name in 'Cannot select' fatal error.Jim Grosbach2012-07-131-0/+1
| | | | | | | | | When dumping the DAG for a fatal 'Cannot select' back-end error, also provide the name of the function the construct is in. Useful when dealing with large testcases, as the next step is to llvm-extract the function in question to get a small(er) testcase. llvm-svn: 160152
* The end of the prologue should be marked with is_stmt.Eric Christopher2012-07-122-1/+29
| | | | | | | | Fixes PR13303. Patch by Paul Robinson! llvm-svn: 160148
* TableGen: Assembly matcher 'insufficient operands' diagnostic.Jim Grosbach2012-07-121-0/+1
| | | | | | | | | | Make sure the tblgen'erated asm matcher correctly returns numoperands+1 as the ErrorInfo when the problem was that there weren't enough operands specified. rdar://9142751 llvm-svn: 160144
* Fix check strings in test/MC/Disassembler/Mips/* and run FileCheck.Akira Hatanaka2012-07-128-760/+694
| | | | | | Patch by Vladimir Medic. llvm-svn: 160143
* Fixed few warnings.Galina Kistanova2012-07-123-7/+10
| | | | llvm-svn: 160142
* Give the rdrand instructions a SideEffect flag and a chain so MachineCSE and ↵Benjamin Kramer2012-07-123-4/+43
| | | | | | | | MachineLICM don't touch it. I already had the necessary things in place for IR-level passes but missed the machine passes. llvm-svn: 160137
* Regenerate.Eric Christopher2012-07-121-1/+1
| | | | llvm-svn: 160134
* The LIT tests below do not specify the exact cpu model and fail on AVX2 ↵Nadav Rotem2012-07-125-9/+9
| | | | | | | | machines, because we select different instructions such as vbroadcast, new shuffles, etc. Patch by Michael Liao. llvm-svn: 160129
* detabifyGabor Greif2012-07-121-2/+2
| | | | llvm-svn: 160128
* fix typo in generated commentGabor Greif2012-07-121-1/+1
| | | | llvm-svn: 160127
* llvm/test/CodeGen/X86/rdrand.ll: Relax expression corresponding to Win64 CC.NAKAMURA Takumi2012-07-121-7/+7
| | | | llvm-svn: 160124
* llvm/test/CMakeLists.txt: Add llvm-diff to deps.NAKAMURA Takumi2012-07-121-1/+3
| | | | llvm-svn: 160123
* Use %s instead of the explicit name, the latter doesn't work in out-of-tree ↵Benjamin Kramer2012-07-121-1/+1
| | | | | | builds. llvm-svn: 160120
* Add intrinsics for Ivy Bridge's rdrand instruction.Benjamin Kramer2012-07-125-3/+107
| | | | | | | | | The rdrand/cmov sequence is the same that is emitted by both GCC and ICC. Fixes PR13284. llvm-svn: 160117
* The result type of EXTRACT_VECTOR_ELT doesn't have to match the element type ofDuncan Sands2012-07-122-0/+30
| | | | | | | | | the input vector, it can be bigger (this is helpful for powerpc where <2 x i16> is a legal vector type but i16 isn't a legal type, IIRC). However this wasn't being taken into account by ExpandRes_EXTRACT_VECTOR_ELT, causing PR13220. Lightly tweaked version of a patch by Michael Liao. llvm-svn: 160116
* Update GATHER instructions to support 2 read-write operands. Patch from ↵Craig Topper2012-07-127-30/+77
| | | | | | myself and Manman Ren. llvm-svn: 160110
* Instcombine was transforming:Evan Cheng2012-07-122-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | %shr = lshr i64 %key, 3 %0 = load i64* %val, align 8 %sub = add i64 %0, -1 %and = and i64 %sub, %shr ret i64 %and to: %shr = lshr i64 %key, 3 %0 = load i64* %val, align 8 %sub = add i64 %0, 2305843009213693951 %and = and i64 %sub, %shr ret i64 %and The demanded bit optimization is actually a pessimization because add -1 would be codegen'ed as a sub 1. Teach the demanded constant shrinking optimization to check for negated constant to make sure it is actually reducing the width of the constant. rdar://11793464 llvm-svn: 160101
* TableGen: Location information for diagnostic.Jim Grosbach2012-07-121-1/+1
| | | | | | | | | | | def Pat<...>; Results in 'record name is not a string!' diagnostic. Not the best, but the lack of location information moves it from not very helpful into completely useless. We're in the Record class when throwing the error, so just add the location info directly. llvm-svn: 160098
* ARM: fix typo in commentsManman Ren2012-07-111-1/+1
| | | | llvm-svn: 160093
* ARM: Fix optimizeCompare to correctly check safe condition.Manman Ren2012-07-112-9/+33
| | | | | | | | It is safe if CPSR is killed or re-defined. When we are done with the basic block, check whether CPSR is live-out. Do not optimize away cmp if CPSR is live-out. llvm-svn: 160090
* Patch for Mips direct object generation.Jack Carter2012-07-111-0/+8
| | | | | | | | | | | | | | | | | When WriteFragmentData() case FT_align called Asm.getBackend().writeNopData() is called, nothing is done since Mips implementation of writeNopData just returned "true". For some reason this has not caused problems in 32 bit mode, but in 64 bit mode it caused an assert when processing multiple function units. The test case included will assert without this patch. It runs twice with different flags to prevent false positives due to changes in code generation over time. llvm-svn: 160084
* Fixup broken doc link. Patch by Sean Silva <silvas@purdue.edu>.Chad Rosier2012-07-112-2/+2
| | | | llvm-svn: 160082
* This change removes an "initialization" warning.Jack Carter2012-07-111-4/+3
| | | | | | | | Even though variable in question could not be initialized before use, the code was such that the compiler had no way of knowing that. llvm-svn: 160081
* Fixed diff comparison.Stepan Dyatkovskiy2012-07-111-1/+1
| | | | llvm-svn: 160076
* In MemoryBuffer::getOpenFile() don't verify that the mmap'edArgyrios Kyrtzidis2012-07-111-10/+0
| | | | | | | | | | | | file buffer is null-terminated. If the file is smaller than we thought, mmap will not allow dereferencing past the pages that are enough to cover the actual file size, even though we asked for a larger address range. rdar://11612916 llvm-svn: 160075
OpenPOWER on IntegriCloud