summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Typo fix and simplification.Rafael Espindola2016-01-221-4/+2
| | | | | | Thanks to Justin Bogner for the suggestion. llvm-svn: 258540
* Remove dead code.Rui Ueyama2016-01-221-1/+0
| | | | llvm-svn: 258539
* Revert 258486 -- for a better fix coming soonXinliang David Li2016-01-223-71/+63
| | | | llvm-svn: 258538
* AMDGPU: Fix crash with invariant markersMatt Arsenault2016-01-222-0/+33
| | | | | | | | The promote alloca pass didn't handle these intrinsics and crashed. These intrinsics should accept any address space, but for now just erase them to avoid breaking. llvm-svn: 258537
* [NVPTX] expand mul_lohi to mul_lo and mul_hiJingyue Wu2016-01-222-0/+28
| | | | | | | | | | | | Summary: Fixes PR26186. Reviewers: grosser, jholewinski Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D16479 llvm-svn: 258536
* Add ArrayRef support to EndianStream.Rafael Espindola2016-01-222-0/+37
| | | | | | | | | | Using an array instead of ArrayRef would allow type inference, but (short of using C99) one would still need to write typedef uint16_t VT[]; LE.write(VT{0x1234, 0x5678}); llvm-svn: 258535
* [AArch64] Simplify emitConditionalCompare calls. NFC.Ahmed Bougacha2016-01-221-13/+9
| | | | | | | Now that both callsites are identical, we can simplify the prototype and make it easier to reason about the 2-CC case. llvm-svn: 258534
* [AArch64] Lower 2-CC FCCMPs (one/ueq) using AND'ed CCs.Ahmed Bougacha2016-01-222-26/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current behavior is incorrect, as the two CCs returned by changeFPCCToAArch64CC, intended to be OR'ed, are instead used in an AND ccmp chain. Consider: define i32 @t(float %a, float %b, float %c, float %d, i32 %e, i32 %f) { %cc1 = fcmp one float %a, %b %cc2 = fcmp olt float %c, %d %and = and i1 %cc1, %cc2 %r = select i1 %and, i32 %e, i32 %f ret i32 %r } Assuming (%a < %b) and (%c < %d); we used to do: fcmp s0, s1 # nzcv <- 1000 orr w8, wzr, #0x1 # w8 <- 1 csel w9, w8, wzr, mi # w9 <- 1 csel w8, w8, w9, gt # w8 <- 1 fcmp s2, s3 # nzcv <- 1000 cset w9, mi # w9 <- 1 tst w8, w9 # (w8 & w9) == 1, so: nzcv <- 0000 csel w0, w0, w1, ne # w0 <- w0 We now do: fcmp s2, s3 # nzcv <- 1000 fccmp s0, s1, #0, mi # mi, so: nzcv <- 1000 fccmp s0, s1, #8, le # !le, so: nzcv <- 1000 csel w0, w0, w1, pl # !pl, so: w0 <- w1 In other words, we transformed: (c < d) && ((a < b) || (a > b)) into: (c < d) && (a u>= b) && (a u<= b) whereas, per De Morgan's, we wanted: (c < d) && !((a u>= b) && (a u<= b)) Note that this problem doesn't occur in the test-suite. changeFPCCToAArch64CC produces disjunct CCs; here, one -> mi/gt. We can't represent that in the fccmp chain; it can't express arbitrary OR sequences, as one comment explains: In general we can create code for arbitrary "... (and (and A B) C)" sequences. We can also implement some "or" expressions, because "(or A B)" is equivalent to "not (and (not A) (not B))" and we can implement some negation operations. [...] However there is no way to negate the result of a partial sequence. Instead, introduce changeFPCCToANDAArch64CC, which produces the conjunct cond codes: - (a one b) == ((a olt b) || (a ogt b)) == ((a ord b) && (a une b)) - (a ueq b) == ((a uno b) || (a oeq b)) == ((a ule b) && (a uge b)) Note that, at first, one might think that, when PushNegate is true, we should use the disjunct CCs, in effect doing: (a || b) = !(!a && !(b)) = !(!a && !(b1 || b2)) <- changeFPCCToAArch64CC(b, b1, b2) = !(!a && !b1 && !b2) However, we can take advantage of the fact that the CC is already negated, which lets us avoid special-casing PushNegate and doing the simpler to reason about: (a || b) = !(!a && (!b)) = !(!a && (b1 && b2)) <- changeFPCCToANDAArch64CC(!b, b1, b2) = !(!a && b1 && b2) This makes both emitConditionalCompare cases behave identically, and produces correct ccmp sequences for the 2-CC fcmps. llvm-svn: 258533
* [AArch64] Assert that CCMP isel didn't fail inconsistently.Ahmed Bougacha2016-01-221-0/+2
| | | | | | | | | | | | We verify that the op tree is eligible for CCMP emission in isConjunctionDisjunctionTree, but it's also possible that emitConjunctionDisjunctionTree fails later. The initial check is useful, as it avoids building nodes that will get discarded. Still, make sure that inconsistencies don't happen with an assert. llvm-svn: 258532
* Fix the build by using the correct suffix for 64 bit literalsAdrian Prantl2016-01-222-2/+2
| | | | llvm-svn: 258531
* [MSVC Compat] Accept elided commas in macro function argumentsEhsan Akhgari2016-01-224-7/+32
| | | | | | | | | | | | | | | Summary: This fixes PR25875. When the trailing comma in a macro argument list is elided, we need to treat it similarly to the case where a variadic macro misses one actual argument. Reviewers: rnk, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15670 llvm-svn: 258530
* [RS4GC] Use OB_deopt instead of "deopt"Sanjoy Das2016-01-221-1/+2
| | | | llvm-svn: 258529
* Add missing cleanup code for cached indirect lock pool.Jonathan Peyton2016-01-221-0/+1
| | | | | | | | | | | This change fixes one issue reported at https://llvm.org/bugs/show_bug.cgi?id=26184 There was missing cleanup code for the cached indirect lock pool. The change will fix the reported case where it tries to initialize a lock after runtime cleanup/reinitialization, but it is still possible that the user program runs into another problem because most test programs have a call to __kmpc_set_lock after cleanup/reinitialization without calling __kmpc_init_lock causing a crash/hang. llvm-svn: 258528
* [Hexagon] Use general purpose registers to spill pred/mod registers intoKrzysztof Parzyszek2016-01-225-78/+352
| | | | | | Patch by Tobias Edler Von Koch. llvm-svn: 258527
* Rephrase this test to help debug a buildbot issueAdrian Prantl2016-01-221-1/+2
| | | | llvm-svn: 258526
* AMDGPU: Fix getArchTypePrefixMatt Arsenault2016-01-221-2/+2
| | | | llvm-svn: 258525
* Merge templated static member variables, fixes http://llvm.org/pr26179.Yaron Keren2016-01-226-2/+54
| | | | | | | Patch by Vassil Vassilev! Reviewed by Richard Smith. llvm-svn: 258524
* AMDGPU: Rename some r600 intrinsics to use correct TargetPrefixMatt Arsenault2016-01-225-48/+53
| | | | | | These ones aren't directly emitted by mesa and inserted by a pass. llvm-svn: 258523
* AMDGPU: Remove unused R600 intrinsicsMatt Arsenault2016-01-222-48/+0
| | | | llvm-svn: 258522
* [WinEH] Make collectFuncletMembers non-recursiveDavid Majnemer2016-01-221-22/+20
| | | | | | | Use a worklist for the pre-order DFS instead of using recursion. No functionality change is intended. llvm-svn: 258521
* Fix MachOObjectFile::getSymbolName() to not call report_fatal_error()Kevin Enderby2016-01-223-5/+13
| | | | | | | | | | | but to return object_error::parse_failed.  Then made the code in llvm-nm do for Mach-O files what is done in the darwin native tools which is to print "bad string index" for bad string indexes. Updated the error message in the llvm-objdump test, and added tests to show llvm-nm prints "bad string index" and a test to print the actual bad string index value which in this case is 0xfe000002 when printing the fields as raw hex. llvm-svn: 258520
* Fix a typo in r258507 and change the PCH dwoid constant to ~1UL.Adrian Prantl2016-01-223-3/+4
| | | | | | rdar://problem/24290667 llvm-svn: 258519
* Fix 80-column violations.Adrian Prantl2016-01-221-3/+6
| | | | llvm-svn: 258518
* [analyzer] SATestBuild.py: Handle spaces in path passed to --use-analyzer.Devin Coughlin2016-01-221-2/+2
| | | | | | I missed this one in r258493. llvm-svn: 258517
* AMDGPU: Change control flow intrinsics to use amdgcn prefixMatt Arsenault2016-01-223-21/+23
| | | | | | | These aren't supposed to be used outside of the backend, so there aren't any users to worry about. llvm-svn: 258516
* AMDGPU: Don't use separate mulhu/mulhs PatsMatt Arsenault2016-01-221-12/+2
| | | | llvm-svn: 258515
* AMDGPU: Remove random TGSI intrinsicMatt Arsenault2016-01-223-14/+0
| | | | | | I don't think this was ever used. llvm-svn: 258514
* AMDGPU: Remove AMDGPU.fract intrinsicMatt Arsenault2016-01-228-78/+88
| | | | | | | Mesa doesn't use this, and this is pattern matched already from fsub x, (ffloor x) llvm-svn: 258513
* unordered: Rename __construct_node_hash() to allow forwarding, NFCDuncan P. N. Exon Smith2016-01-221-8/+10
| | | | | | | | | | | | | | Rename the version of __construct_node() that takes a hash as an argument to __construct_node_hash(), and use perfect-forwarding when Rvalue references are available. The primary motivation is to allow other types through, since unordered_map's value_type is different from __hash_table's value_type -- a follow-up will take advantage of this -- but the rename is general "goodness". There should be no functionality change here (aside from enabling the follow-up). llvm-svn: 258511
* [PGO] add an interface needed by icall promotionXinliang David Li2016-01-222-1/+17
| | | | llvm-svn: 258509
* [ELF] - fix possible UB when dereferencing nullGeorge Rimar2016-01-223-9/+9
| | | | | | | | | In InputSection.cpp it was possible to dereference null. Had to change signature of relocateTlsOptimize to accept pointer instead of reference. Differential revision: http://reviews.llvm.org/D16466 llvm-svn: 258508
* Module Debugging: Use a nonzero DWO id for precompiled headers.Adrian Prantl2016-01-224-4/+14
| | | | | | | | | | | | | PCH files don't have a module signature and LLVM uses a nonzero DWO id as an indicator for skeleton / module CUs. This change pins the DWO id for PCH files to a known constant value. The correct long-term solution here is to implement a module signature that is an actual dterministic hash (at the moment module signatures are just random nonzero numbers) and then enable this for PCH files as well. <rdar://problem/24290667> llvm-svn: 258507
* [MSVC Compat] Don't provide /volatile:ms semantics to types > pointerDavid Majnemer2016-01-222-5/+30
| | | | | | | | | | | | Volatile loads of type wider than a pointer get split by MSVC because the base x86 ISA doesn't provide loads which are wider than pointer width. LLVM assumes that it can emit an cmpxchg8b but this is problematic if the memory is in a CONST memory segment. Instead, provide behavior compatible with MSVC: split loads wider than a pointer. llvm-svn: 258506
* Try to pacify MSVC.Nico Weber2016-01-221-1/+2
| | | | | | I'm not sure why it needs these braces, but they help locally. llvm-svn: 258505
* Change of UserLabelPrefix default value from "_" to ""Andrey Bokhanko2016-01-222-32/+23
| | | | | | Differential Revision: http://reviews.llvm.org/D16295 llvm-svn: 258504
* Let RecursiveASTVisitor visit array index VarDeclsNico Weber2016-01-223-0/+31
| | | | | | | | | | | | An implicit copy ctor creates loop VarDecls that hang off CXXCtorInitializer. RecursiveASTVisitor used to not visit them, so that they didn't show up in the parent map used by ASTMatchers, causing asserts() when the implicit DeclRefExpr() in a CXXCtorInitializer referred to one of these VarDecls. Fixes PR26227. http://reviews.llvm.org/D16413 llvm-svn: 258503
* [OpenMP] Sema for depend clause on target exit data directive.Arpith Chacko Jacob2016-01-223-2/+232
| | | | | | | | | | | Summary: Accept depend clause on target exit data directive in sema and add test cases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16401 llvm-svn: 258502
* Revert "Enable test log collection from remote debug servers"Pavel Labath2016-01-221-18/+6
| | | | | | | | Unfortunately, this turns out not to be working on the lldb-server tests, as there the server is started in a different way. Since this was a bit of a hack to start with, I am removing it until I can solve the problem more holistically. llvm-svn: 258501
* Replace some tabs with spaces.Nico Weber2016-01-221-4/+3
| | | | llvm-svn: 258500
* Use of llvm_unreachable instead of warning in ↵George Rimar2016-01-221-5/+2
| | | | | | EhFrameHeader<ELFT>::assignEhFrame(). llvm-svn: 258499
* ScopDetection: Do not detect regions with irreducible control as scopsTobias Grosser2016-01-225-0/+250
| | | | | | | | | | | | | | Polly currently does not support irreducible control and it is probably not worth supporting. This patch adds code that checks for irreducible control and refuses regions containing irreducible control. Polly traditionally had rather restrictive checks on the control flow structure which would have refused irregular control, but within the last couple of months most of the control flow restrictions have been removed. As part of this generalization we accidentally allowed irregular control flow. Contributed-by: Karthik Senthil and Ajith Pandel llvm-svn: 258497
* Remove irreducible control flow from test caseTobias Grosser2016-01-221-7/+13
| | | | | | | | | | | | | | | The test case we look at does not necessarily require irreducible control flow, but a normal loop is sufficient to create a non-affine region containing more than one basic block that dominates the exit node. We replace this irreducible control flow with a normal loop for the following reasons: 1) This is easier to understand 2) We will subsequently commit a patch that ensures Polly does not process irreducible control flow. Within non-affine regions, we could possibly handle irreducible control flow. llvm-svn: 258496
* [OPENMP] Generalize codegen for 'sections'-based directive.Alexey Bataev2016-01-2210-203/+183
| | | | | | If 'sections' directive has only one sub-section, the code for 'single'-based directive was emitted. Removed this codegen, because it causes crashes in different cases. llvm-svn: 258495
* www: Update links to LLVM bug trackerTobias Grosser2016-01-221-4/+4
| | | | | | | | Polly recently got its own product in LLVM's bug tracker, which will make it easier for people to file Polly bugs. This change updates the bugtracker links on the Polly website. llvm-svn: 258494
* [analyzer] Update SATestBuild.py to handle spaces in paths.Devin Coughlin2016-01-221-10/+10
| | | | | | | The Jenkins workspace on the new Green Dragon builder for the static analyzer has spaces in its path. llvm-svn: 258493
* 2 missing intrinsics _cvtss_sh and _mm_cvtps_ph were added to the intrinsics ↵Ekaterina Romanova2016-01-222-3/+28
| | | | | | | | header f16intrin.h Differential Revision: http://reviews.llvm.org/D16177 llvm-svn: 258492
* Add __uncvref type for use in later patchesEric Fiselier2016-01-221-0/+7
| | | | llvm-svn: 258491
* [TableGen] Make a class member local to the function that populates it and ↵Craig Topper2016-01-221-1/+2
| | | | | | consumes it later. NFC llvm-svn: 258490
* [TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce ↵Craig Topper2016-01-221-6/+5
| | | | | | size. NFC llvm-svn: 258489
* [TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for ↵Craig Topper2016-01-222-8/+3
| | | | | | anything. NFC llvm-svn: 258488
OpenPOWER on IntegriCloud