summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Disable IsSub subregister assert. pr18663.Will Schmidt2014-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to the activity in the bug at http://llvm.org/bugs/show_bug.cgi?id=18663 . The underlying issue has to do with how the KILL pseudo-instruction is handled. I defer to Hal/Jakob/Uli for additional details and background. This will disable the (bad?) assert, add an associated fixme comment, and add a pair of tests. The code change and the pr18663-2.ll test are copied from the referenced bug. That test does not immediately fail in my environment, but I have added the pr18663.ll test which does. (Comment from Hal) to provide everyone else with some context, this assert was not bad when it was written. At that time, we only generated KILL pseudo instructions around subregister copies. This logic, unfortunately, had its own problems. In r199797, the relevant logic in MachineCopyPropagation was replaced to generate KILLs for other kinds of copies too. This change in semantics broke this now-problematic assumption in AggressiveAntiDepBreaker. The AggressiveAntiDepBreaker really needs a proper cleanup to deal with the change, but removing the assert (which just allows the function to return false) is a safe conservative behavior, and should do for the time being. llvm-svn: 214429
* Move MCObjectSymbolizer.h to MC/MCAnalysis.Rafael Espindola2014-07-312-2/+2
| | | | | | The cpp file is already in lib/MC/MCAnalysis. llvm-svn: 214424
* Fix ScalarEvolutionExpander when creating a PHI in a block with duplicate ↵Hal Finkel2014-07-311-1/+5
| | | | | | | | | | | | | | predecessors It seems that when I fixed this, almost exactly a year ago, I did not quite do it correctly. When we have duplicate block predecessors, we can indeed not have different incoming values for the same block, but we *must* have duplicate entries. So, instead of skipping the duplicates, we explicitly add the duplicate incoming values. Fixes PR20442. llvm-svn: 214423
* UseListOrder: Handle self-usersDuncan P. N. Exon Smith2014-07-311-3/+3
| | | | | | | | | | Correctly sort self-users (such as PHI nodes). I added a targeted test in `test/Bitcode/use-list-order.ll` and the final missing RUN line to tests in `test/Assembly`. This is part of PR5680. llvm-svn: 214417
* Fix loop end condition.Eric Christopher2014-07-311-1/+1
| | | | | Note: This code appears to be untested. llvm-svn: 214416
* Fixing an -Woverloaded-virtual warnings by exposing the hidden virtual ↵Aaron Ballman2014-07-311-0/+1
| | | | | | function as well. No functional changes intended. llvm-svn: 214400
* Fixing a -Wcast-qual warning in GCC. No functional changes.Aaron Ballman2014-07-311-2/+2
| | | | llvm-svn: 214399
* [msan] Fix handling of array types.Evgeniy Stepanov2014-07-311-5/+16
| | | | | | | | Switch array type shadow from a single integer to an array of integers (i.e. make it per-element). This simplifies instrumentation of extractvalue and fixes PR20493. llvm-svn: 214398
* [asan] Support x86 REP MOVS asm instrumentation.Evgeniy Stepanov2014-07-313-20/+153
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 214395
* MergeFunctions, tiny refactoring:Stepan Dyatkovskiy2014-07-311-4/+4
| | | | | | cmpOperation has been renamed to cmpOperations (multiple form). llvm-svn: 214392
* [FastISel][AArch64] Add basic bitcast support for conversion between float ↵Juergen Ributzka2014-07-311-0/+37
| | | | | | | | and int. Fixes <rdar://problem/17867078>. llvm-svn: 214389
* [FastISel][AArch64] Add sqrt intrinsic support.Juergen Ributzka2014-07-311-0/+19
| | | | | | Fixes <rdar://problem/17867067>. llvm-svn: 214388
* InstCombine: Correctly propagate NSW/NUW for x-(-A) -> x+ADavid Majnemer2014-07-311-3/+9
| | | | | | | | | | | | We can only propagate the nsw bits if both subtraction instructions are marked with the appropriate bit. N.B. We only propagate the nsw bit in InstCombine because the nuw case is already handled in InstSimplify. This fixes PR20189. llvm-svn: 214385
* InstSimplify: Simplify (X - (0 - Y)) if the second sub is NUWDavid Majnemer2014-07-311-0/+12
| | | | | | | | | | | If the NUW bit is set for 0 - Y, we know that all values for Y other than 0 would produce a poison value. This allows us to replace (0 - Y) with 0 in the expression (X - (0 - Y)) which will ultimately leave us with X. This partially fixes PR20189. llvm-svn: 214384
* [FastISel][AArch64] Add MachO large code model support for function calls.Juergen Ributzka2014-07-311-10/+105
| | | | | | | | | Currently the large code model for MachO uses the GOT to make function calls. Emit the required adrp and ldr instructions to load the address from the GOT. Related to <rdar://problem/17733076>. llvm-svn: 214381
* A std::unique_ptr case I missed in the previous patch.Rafael Espindola2014-07-312-4/+6
| | | | llvm-svn: 214379
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-3110-19/+24
| | | | llvm-svn: 214377
* Don't fail tablegen immediately after failing to set a value.Pete Cooper2014-07-311-1/+4
| | | | | | | | Instead allow the variable to be declared, but don't attach an initializer. This allows more than a single error to be emitted before we exit. Test case to follow soon in another patch. llvm-svn: 214375
* Add a better error message when failing to assign one tablegen value to anotherPete Cooper2014-07-311-1/+8
| | | | | | | | This is currently for assigning from one bit init to another. It can easily be extended to other types. Test to follow soon in another patch. llvm-svn: 214374
* Fix bit initializer which was one bit too long, but worked so long as we ↵Pete Cooper2014-07-311-1/+1
| | | | | | silently dropped the leading 0 llvm-svn: 214373
* Fix bit initializer which was one bit too long, but worked so long as we ↵Pete Cooper2014-07-311-1/+1
| | | | | | silently dropped the leading 0 llvm-svn: 214372
* Delete dead code.Rafael Espindola2014-07-313-10/+4
| | | | llvm-svn: 214370
* UseListOrder: Don't give constant IDs to GlobalValuesDuncan P. N. Exon Smith2014-07-311-3/+6
| | | | | | | | | | | Since initializers of GlobalValues are being assigned IDs before GlobalValues themselves, explicitly exclude GlobalValues from the constant pool. Added targeted test in `test/Bitcode/use-list-order.ll` and added two more RUN lines in `test/Assembly`. This is part of PR5680. llvm-svn: 214368
* [FastISel] Fix the patchpoint intrinsic lowering in FastISel for large ↵Juergen Ributzka2014-07-311-1/+1
| | | | | | | | | target addresses. This fixes a mistake where I accidentially dropped the upper 32bit of a 64bit pointer during FastISel lowering of the patchpoint intrinsic. llvm-svn: 214367
* [FastISel][AArch64 and X86] Don't emit stores for UNDEF arguments during ↵Juergen Ributzka2014-07-312-0/+9
| | | | | | | | | | function call lowering. UNDEF arguments are not ment to be touched - especially for the webkit_js calling convention. This fix reproduces the already existing behavior of SelectionDAG in FastISel. llvm-svn: 214366
* X86 asm parser: Avoid duplicating the list of aliased instructionsReid Kleckner2014-07-311-16/+11
| | | | | | No functional change. llvm-svn: 214364
* Add mtpid/mfpid for BookE.Joerg Sonnenberger2014-07-301-0/+3
| | | | llvm-svn: 214363
* Attempt at fixing the windows dll build.Rafael Espindola2014-07-301-1/+1
| | | | | | | It looks like only direct (i.e., explicitly listed) dependencies are scanned. llvm-svn: 214361
* Use "weak alias" instead of "alias weak"Rafael Espindola2014-07-303-18/+14
| | | | | | | | | | | | | | | | | | | | | Before this patch we had @a = weak global ... but @b = alias weak ... The patch changes aliases to look more like global variables. Looking at some really old code suggests that the reason was that the old bison based parser had a reduction for alias linkages and another one for global variable linkages. Putting the alias first avoided the reduce/reduce conflict. The days of the old .ll parser are long gone. The new one parses just "linkage" and a later check is responsible for deciding if a linkage is valid in a given context. llvm-svn: 214355
* Refactor TLBIVAX and add tlbsx.Joerg Sonnenberger2014-07-302-8/+10
| | | | llvm-svn: 214354
* X86 asm parser: Use a loop to disambiguate suffixes instead of copy pasteReid Kleckner2014-07-301-38/+20
| | | | | | | | | This works towards making the Intel syntax asm matcher use a completely different disambiguation strategy. No functional change. llvm-svn: 214352
* [FastISel][AArch64] Add select folding support for the XALU intrinsics.Juergen Ributzka2014-07-301-34/+36
| | | | | | | | | | | This improves the code generation for the XALU intrinsics when the condition is feeding a select instruction. This also updates and enables the XALU unit tests for FastISel. This fixes <rdar://problem/17831117>. llvm-svn: 214350
* [FastISel][AArch64] Add branch folding support for the XALU intrinsics.Juergen Ributzka2014-07-301-3/+77
| | | | | | | | | This improves the code generation for the XALU intrinsics when the condition is feeding a branch instruction. This is related to <rdar://problem/17831117>. llvm-svn: 214349
* [FastISel][AArch64] Add {s|u}{add|sub|mul}.with.overflow intrinsic support.Juergen Ributzka2014-07-301-0/+171
| | | | | | | | | | This commit adds support for the {s|u}{add|sub|mul}.with.overflow intrinsics. The unit tests for FastISel will be enabled in a later commit, once there is also branch and select folding support. This is related to <rdar://problem/17831117>. llvm-svn: 214348
* [FastISel] Move the helper function isCommutativeIntrinsic into FastISel ↵Juergen Ributzka2014-07-301-12/+0
| | | | | | | | | base class. Move the helper function isCommutativeIntrinsic into the FastISel base class, so it can be used by more than just one backend. llvm-svn: 214347
* [FastISel][AArch64] Create helper functions to create the various multiplies ↵Juergen Ributzka2014-07-301-24/+70
| | | | | | on AArch64. llvm-svn: 214346
* [FastISel][AArch64] Add support for shift-immediate.Juergen Ributzka2014-07-301-1/+101
| | | | | | | | Currently the shift-immediate versions are not supported by tblgen and hopefully this can be later removed, once the required support has been added to tblgen. llvm-svn: 214345
* InstCombine: Simplify (A ^ B) or/and (A ^ B ^ C)David Majnemer2014-07-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we can already transform A | (A ^ B) into A | B, things get bad once we have (A ^ B) | (A ^ B ^ Cst) because reassociation will morph this into (A ^ B) | ((A ^ Cst) ^ B). Our existing patterns fail once this happens. To fix this, we add a new pattern which looks through the tree of xor binary operators to see that, in fact, there exists a redundant xor operation. What follows bellow is a correctness proof of the transform using CVC3. $ cat t.cvc A, B, C : BITVECTOR(64); QUERY BVXOR(A, B) | BVXOR(BVXOR(B, C), A) = BVXOR(A, B) | C; QUERY BVXOR(BVXOR(A, C), B) | BVXOR(A, B) = BVXOR(A, B) | C; QUERY BVXOR(A, B) & BVXOR(BVXOR(B, C), A) = BVXOR(A, B) & ~C; QUERY BVXOR(BVXOR(A, C), B) & BVXOR(A, B) = BVXOR(A, B) & ~C; $ cvc3 < t.cvc Valid. Valid. Valid. Valid. llvm-svn: 214342
* Add rfdi and rfmci from the e500/e500mc ISA.Joerg Sonnenberger2014-07-301-0/+3
| | | | llvm-svn: 214339
* SLP Vectorizer: Canonicalize tree operands of commutitive binary operands.Chad Rosier2014-07-301-12/+32
| | | | llvm-svn: 214338
* SimplifyCFG: Avoid miscompilations due to removed lifetime intrinsics.Rafael Espindola2014-07-301-1/+1
| | | | | | | | | | | The lifetime intrinsics need some work in order to make it clear which optimizations are or are not valid. For now dropping this optimization avoids a miscompilation. Patch by Björn Steinbrink. llvm-svn: 214336
* Add BookE's tlbre, tlbwe and tlbivax instructions.Joerg Sonnenberger2014-07-301-0/+15
| | | | llvm-svn: 214332
* Refactor duplicated code.Rafael Espindola2014-07-303-47/+31
| | | | llvm-svn: 214328
* Fixing a few -Woverloaded-virtual warnings by exposing the hidden virtual ↵Aaron Ballman2014-07-302-0/+4
| | | | | | function as well. No functional changes intended. llvm-svn: 214325
* Retain alignment requirements for load->selects modified by DAGCombineLouis Gerbarg2014-07-301-2/+6
| | | | | | | | | | | | | | | | | DAGCombine may choose to rewrite graphs where two loads feed a select into graphs where a select of two addresses feed a load. While it sanity checks the loads to make sure they are broadly equivalent it currently just uses the alignment restriction of the left node. In cases where the right node has stronger alignment requiresment this may lead to bad codegen, such as generating an aligned load where an unaligned load is required. This patch makes the combine generate a load with an alignment that is the same as whichever is more restrictive of the two alignments. Tests included. rdar://17762530 llvm-svn: 214322
* UseListOrder: Visit global valuesDuncan P. N. Exon Smith2014-07-301-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When predicting use-list order, we visit functions in reverse order followed by `GlobalValue`s and write out use-lists at the first opportunity. In the reader, this will translate to *after* the last use has been added. For this to work, we actually need to descend into `GlobalValue`s. Added a targeted test in `use-list-order.ll` and `RUN` lines to the newly passing tests in `test/Bitcode`. There are two remaining failures in `test/Bitcode`: - blockaddress.ll: I haven't thought through how to model the way block addresses change the order of use-lists (or how to work around it). - metadata-2.ll: There's an old-style `@llvm.used` global array here that I suspect the .ll parser isn't upgrading properly. When it round-trips through bitcode, the .bc reader *does* upgrade it, so the extra variable (`i8* null`) has an extra use, and the shuffle vector doesn't match. I think the fix is to upgrade old-style global arrays (or reject them?) in the .ll parser. This is part of PR5680. llvm-svn: 214321
* Add the missing hasLinkOnceODRLinkage predicate.Rafael Espindola2014-07-303-7/+3
| | | | llvm-svn: 214312
* Add BookE's wrtee and wrteei instructions.Joerg Sonnenberger2014-07-301-0/+13
| | | | llvm-svn: 214297
* SPRG 0 to 3 are valid outside BookE, so move them to the normal testJoerg Sonnenberger2014-07-302-0/+20
| | | | | | file. Add support for accessing SPRG 4 to 7 on BookE. llvm-svn: 214295
* Don't manually (and forcibly) run the verifier on the entire module fromChandler Carruth2014-07-301-4/+0
| | | | | | | | | | | | | the jump instruction table pass. First, the verifier is already built into all the tools. The test case is adapted to just run llvm-as demonstrating that we still catch the broken module. Second, the verifier is *extremely* slow. This was responsible for very significant compile time regressions. If you have deployed a Clang binary anywhere from r210280 to this commit, you really want to re-deploy. llvm-svn: 214287
OpenPOWER on IntegriCloud