summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Adds -Wrange-loop-analysis to -Wall"Mark de Wever2020-01-013-5/+2
| | | | | | The sanitizer-x86_64-linux buildbot failed to build lld with -Werror. This reverts commit d8117542ac57f6051674ca70ea14c0e0d7d9b046.
* [InstCombine] Fix incorrect inbounds on GEP of GEP (PR44425)Nikita Popov2020-01-014-3/+4
| | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=44425. We need to drop inbounds if one of the GEPs is not inbounds. This was already done when creating a new GEP, but not when modifying in place. Differential Revision: https://reviews.llvm.org/D72059
* [MachineScheduler] improve reuse of 'releaseNode'methodLorenzo Casalino2020-01-012-21/+26
| | | | | | | | | | | | | | | | The 'SchedBoundary::releaseNode' is merely invoked for releasing the Top/Bottom root nodes. However, 'SchedBoundary::releasePending' uses its same logic to check if the Pending queue has any releasable SUnit. It is possible to slightly modify the body of the two, allowing re-use of the former ('releaseNode') in the latter. Patch by Lorenzo Casalino <lorenzo.casalino93@gmail.com> Reviewers: MatzeB, fhahn, atrick Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D65506
* [InstCombine] Add tests for PR44423 and PR44425; NFCNikita Popov2020-01-011-0/+40
|
* [InstCombine] Regenerate test checks; NFCNikita Popov2020-01-012-307/+520
|
* [InstCombine] Add tests for sub nuw of geps; NFCNikita Popov2020-01-011-0/+101
| | | | Tests for PR44419.
* [X86] Call SimplifyMultipleUseDemandedBits from combineVSelectToBLENDV if ↵Craig Topper2020-01-012-27/+45
| | | | | | | | the condition is used by something other than select conditions. We might be able to bypass some nodes on the condition path. Differential Revision: https://reviews.llvm.org/D71984
* Adds -Wrange-loop-analysis to -WallMark de Wever2020-01-013-2/+5
| | | | | | | | This makes the range loop warnings part of -Wall. Fixes PR32823: Warn about accidental coping of data in range based for Differential Revision: https://reviews.llvm.org/D68912
* Improve Wrange-loop-analyses for rvalue referenceMark de Wever2020-01-012-3/+113
| | | | | | | | | | The Wrange-loop-analyses warns if a copy is made. Suppress this warning when a temporary is bound to a rvalue reference. While fixing this issue also found a copy-paste error in test6, which is also fixed. Differential Revision: https://reviews.llvm.org/D71806
* Adds fixit hints to the -Wrange-loop-analysisMark de Wever2020-01-014-3/+57
| | | | Differential Revision: https://reviews.llvm.org/D68913
* [NFC] Fixes -Wrange-loop-analysis warningsMark de Wever2020-01-0137-54/+55
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71857
* [lldb][NFC] Make some checks more readable in Variable::PrivateAutoCompleteRaphael Isemann2020-01-011-3/+3
|
* [ARM] Add +mve feature to mve tests. NFCDavid Green2020-01-013-3/+3
|
* clang-tidy doc: Remove severities as they don't make consensusSylvestre Ledru2020-01-011-392/+388
| | | | | | | | | | | | Reviewers: jdoerfert, aaron.ballman Reviewed By: aaron.ballman Subscribers: whisperity, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72049
* add strict float for round operationLiu, Chen32020-01-0110-41/+956
| | | | Differential Revision: https://reviews.llvm.org/D72026
* [MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocationsFangrui Song2020-01-016-166/+9
| | | | | | | | | | | | clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations check and sets dso_local on applicable global variables. We don't need to duplicate the work in TargetMachine shouldAssumeDSOLocal. Verified that -mpie-copy-relocations can still emit PC relative relocations for external variable accesses. clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32 clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC
* [ELF][RISCV][test] Test absolute/PC-relative/branch relocations to undefined ↵Fangrui Song2019-12-311-0/+79
| | | | weak symbols
* [Attributor] AAValueConstantRange: Value range analysis using constant rangeHideto Ueno2020-01-019-39/+1456
| | | | | | | | | | | | | | | | | | | | | This patch introduces `AAValueConstantRange`, which answers a possible range for integer value in a specific program point. One of the motivations is propagating existing `range` metadata. (I think we need to change the situation that `range` metadata cannot be put to Argument). The state is a tuple of `ConstantRange` and it is initialized to (known, assumed) = ([-∞, +∞], empty). Currently, AAValueConstantRange is created when AAValueSimplify cannot simplify the value. Supported - BinaryOperator(add, sub, ...) - CmpInst(icmp eq, ...) - !range metadata `AAValueConstantRange` is not intended to extend to polyhedral range value analysis. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D71620
* [X86] Fix typo in getCMovOpcode.Craig Topper2019-12-311-1/+1
| | | | | | The 64-bit HasMemoryOperand line was using CMOV32rm instead of CMOV64rm. Not sure how to test this. We have no test coverage that passes true for HasMemoryOperand.
* [X86] Add X87 FCMOV support to X86FlagsCopyLowering.Craig Topper2019-12-312-0/+120
| | | | Fixes PR44396
* DAG: Stop trying to fold FP -(x-y) -> y-x in getNode with nszMatt Arsenault2019-12-314-15/+16
| | | | | | | | | | | | | | This was increasing the number of instructions when fsub was legalized on AMDGPU with no signed zeros enabled. This fold should be guarded by hasOneUse, and I don't think getNode should be doing that. The same fold is already done as a regular combine through isNegatibleForFree. This does require duplicating, even though isNegatibleForFree does this combine already (and properly checks hasOneUse) to avoid one PPC regression. In the regression, the outer fneg has nsz but the fsub operand does not. isNegatibleForFree only sees the operand, and doesn't see it's used from a nsz context. A nsz parameter needs to be added and threaded through isNegatibleForFree to avoid this.
* [ELF][RISCV] Improve error message for unknown relocationsFangrui Song2019-12-311-16/+15
| | | | Like rLLD354040.
* [X86] Constant fold KSHIFT of an all zeros vector to just an all zeros vector.Craig Topper2019-12-312-12/+3
|
* [X86][InstCombine] Add constant folding and simplification support for pdep ↵Craig Topper2019-12-312-0/+190
| | | | | | | | | | | | and pext The instructions use a mask to either pack disjoint bits together(pext) or spread bits to disjoint locations(pdep). If the mask is all 0s then no bits are extracted or deposited. If the mask is all ones, then the source value is written to the result since no compression or expansion happens. Otherwise if both the source and mask are constant we can walk the bits in the source/mask and calculate the result. There other crazier things we could do like computeKnownBits or turning pext into shift/and if only a single contiguous range of bits is extracted. Fixes PR44389 Differential Revision: https://reviews.llvm.org/D71952
* [X86] Use carry flag from add for (seteq (add X, -1), -1).Craig Topper2019-12-312-16/+35
| | | | | | | | If we just subtracted 1 and are checking if the result is -1. We can use the carry flag from the ADD instead of an explicit CMP. I'm using the same checks for the add users as EmitTest. Fixes one case from PR44412 Differential Revision: https://reviews.llvm.org/D72019
* [LegalizeVectorOps][AArch64] Stop asking for v4f16 fp_round and fp_extend to ↵Craig Topper2019-12-312-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | be promoted. These operations are needed as building blocks for promoting so they can't be promoted themselves. This appeared to work because the fp_extend query type for operation actions is the result type, not the input type so it never triggered in the legalizer. For fp_round, the vector op legalizer just ended up creating a nop fp_extend that was elided by getNode, followed by a nop fp_round that was also elided by getNode. This was followed by a final fp_round from v4f32 back to vf416 which was CSEd to the original node. Then legalize vector ops just believed that node legalized to itself. LegalizeDAG took another crack at promoting it, but didn't have a handler so just skipped it with a debug message saying it wasn't promoted. This patch just removes the operation actions to avoid this non-sense. Found while trying to refactor LegalizeVectorOps to handle multiple result nodes better.
* AMDGPU: Precommit test showing extra instructions are introducedMatt Arsenault2019-12-311-0/+27
|
* Revert "[Diagnostic] Add ftabstop to -Wmisleading-indentation"Martin Storsjö2019-12-312-119/+5
| | | | | | | | | This reverts commit b47b35ff51b355a446483777155290541ab64fae. This caused failed asserts (Assertion `FIDAndOffset.second > ColNo && "Column number smaller than file offset?"' failed.) on a source file with a single line containing "int main (void) { for( int i = 0; i < 9; i++ ); return 0; }".
* [amdgpu] Fix scoreboard updating on `s_waitcnt_vscnt`.Michael Liao2019-12-312-1/+18
| | | | | | | | | | Summary: - Other counters are accidentally cleared. Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71866
* [OPENMP]Emit artificial threprivate vars as threadlocal, if possible.Alexey Bataev2019-12-317-26/+26
| | | | It may improve performance for declare reduction constructs.
* [mlir][docs] Remove redundant path prefixJacques Pienaar2019-12-311-1/+1
| | | | ./ is not needed.
* [X86] Add test case for opposite branch condition for PR44412. NFCCraig Topper2019-12-311-0/+34
|
* [CodeGen] Emit conj/conjf/confjl libcalls as fneg instructions if possible.Craig Topper2019-12-313-8/+29
| | | | | | | We already recognize the __builtin versions of these, might as well recognize the libcall version. Differential Revision: https://reviews.llvm.org/D72028
* [mlir] Make code blocks more consistentJacques Pienaar2019-12-319-44/+43
| | | | Use the same form specification for the same type of code.
* [InstCombine] fold zext of masked bit set/clearSanjay Patel2019-12-312-31/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not solve PR17101, but it is one of the underlying diffs noted here: https://bugs.llvm.org/show_bug.cgi?id=17101#c8 We could ease the one-use checks for the 'clear' (no 'not' op) half of the transform, but I do not know if that asymmetry would make things better or worse. Proofs: https://rise4fun.com/Alive/uVB Name: masked bit set %sh1 = shl i32 1, %y %and = and i32 %sh1, %x %cmp = icmp ne i32 %and, 0 %r = zext i1 %cmp to i32 => %s = lshr i32 %x, %y %r = and i32 %s, 1 Name: masked bit clear %sh1 = shl i32 1, %y %and = and i32 %sh1, %x %cmp = icmp eq i32 %and, 0 %r = zext i1 %cmp to i32 => %xn = xor i32 %x, -1 %s = lshr i32 %xn, %y %r = and i32 %s, 1
* [InstCombine] add/adjust tests for masked bit; NFCSanjay Patel2019-12-311-6/+66
|
* Implement additional traverse() overloadsStephen Kelly2019-12-313-0/+150
| | | | | | | | | | | | | | Summary: These overloads make it possible to wrap unless(), anyOf(), has() etc with the traverse matcher. Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71977
* Unnest struct in Matcher implementationStephen Kelly2019-12-311-18/+23
| | | | | This allows implementation of the traverse() matcher to surround matchers like unless().
* Match code following lambdas when ignoring invisible nodesStephen Kelly2019-12-312-1/+7
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71976
* [Attributor][Fix] Avoid leaking memory after D68765Johannes Doerfert2019-12-311-1/+5
|
* Revert "[InstCombine] Fix infinite loop due to bitcast <-> phi transforms"Nikita Popov2019-12-312-148/+0
| | | | | | This reverts commit 27a0795943fee0f30b995fe5165428afc2dfd402. Seems to break test-suite.
* [PowerPC][NFC] Fix clang-tidy warningJinsong Ji2019-12-311-5/+5
| | | | | | | | | | | | | | | | | | Reported by https://results.llvm-merge-guard.org/amd64_debian_testing_clang8-726/clang-tidy.txt /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11672:10: warning: invalid case style for variable 'isEQ' [readability-identifier-naming] bool isEQ = (MI.getOpcode() == PPC::ANDI_rec_1_EQ_BIT || ^~~~ IsEq /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11679:14: warning: invalid case style for variable 'dl' [readability-identifier-naming] DebugLoc dl = MI.getDebugLoc(); ^~ Dl
* [OpenCL] Remove redundant foreach in OpenCLBuiltins.td; NFCSven van Haastregt2019-12-311-76/+32
| | | | | Remove various `foreach` declarations where the iterator is used only once. This makes the .td file more compact.
* [AArch64] add test for fsub+fneg; NFCSanjay Patel2019-12-311-0/+16
| | | | D72015 proposes to restrict the current behavior.
* [InstCombine] add tests for masked bit set/clear; NFCSanjay Patel2019-12-311-20/+188
|
* [InstCombine] Fix infinite loop due to bitcast <-> phi transformsNikita Popov2019-12-312-0/+148
| | | | | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=44245. The optimizeBitCastFromPhi() and FoldPHIArgOpIntoPHI() end up fighting against each other, because optimizeBitCastFromPhi() assumes that bitcasts of loads will get folded. This doesn't happen here, because a dangling phi node prevents the one-use fold in https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp#L620-L628 from triggering. This patch fixes the issue by adding manually removing the old phis. Differential Revision: https://reviews.llvm.org/D71164
* [mlir][Linalg] Delete unused LinalgLibraryOps.tdNicolas Vasilache2019-12-311-616/+0
| | | | | | | | | | | | Summary: This has been previously renamed to LinalgStructuredOps.td Reviewers: ftynse Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits, ftynse Tags: #llvm Differential Revision: https://reviews.llvm.org/D72013
* [llvm-exegesis] Check counters before runningMiloš Stojanović2019-12-313-8/+18
| | | | | | | Check if the appropriate counters for the specified mode are defined on the target. This is checked before any other work is done. Differential Revision: https://reviews.llvm.org/D71927
* [ARM][TypePromotion] Re-enable by defaultSam Parker2019-12-311-1/+1
| | | | Re-enable the pass after it was reverted and the bug fixed.
* Fix external-names.c test when separator is \\Michael Platings2019-12-311-3/+3
| | | | | | | | | | | | | This fixes the following failure: C:\[...]\llvm\tools\clang\test\VFS\external-names.c:34:26: error: CHECK-DEBUG-EXTERNAL: expected string not found in input // CHECK-DEBUG-EXTERNAL: ![[Num]] = !DIFile(filename: "{{[^"]*}}Inputs{{.}}external-names.h" ^ [...] <stdin>:42:54: note: possible intended match here !10 = !DIFile(filename: "C:/[...]\\llvm\\tools\\clang\\test\\VFS\\Inputs\\external-names.h", directory: "") Differential Revision: https://reviews.llvm.org/D71991
OpenPOWER on IntegriCloud