]> granicus.if.org Git - llvm/log
llvm
5 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Mon, 23 Sep 2019 07:57:53 +0000 (07:57 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

Differential Revision: https://reviews.llvm.org/D66526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372554 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.
Craig Topper [Mon, 23 Sep 2019 05:35:23 +0000 (05:35 +0000)]
[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372544 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent...
Craig Topper [Mon, 23 Sep 2019 05:35:20 +0000 (05:35 +0000)]
[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent an infinite loop.

The attached test case would previous infinite loop after
r365711.

I'm going to move this to X86ISelDAGToDAG.cpp to get the setcc
to match VPTEST in 32-bit mode in a follow up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372543 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add 32-bit command line to avx512f-vec-test-testn.ll
Craig Topper [Mon, 23 Sep 2019 05:35:15 +0000 (05:35 +0000)]
[X86] Add 32-bit command line to avx512f-vec-test-testn.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372542 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoPrefer AVX512 memcpy when applicable
David Zarzycki [Mon, 23 Sep 2019 05:00:59 +0000 (05:00 +0000)]
Prefer AVX512 memcpy when applicable

When AVX512 is available and the preferred vector width is 512-bits or
more, we should prefer AVX512 for memcpy().

https://bugs.llvm.org/show_bug.cgi?id=43240

https://reviews.llvm.org/D67874

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372540 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant...
Craig Topper [Mon, 23 Sep 2019 01:21:51 +0000 (01:21 +0000)]
[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant during lowering.

This allows us to use timm in the isel table which is more
consistent with other intrinsics that take an immediate now.

We can't declare the intrinsic as taking an ImmArg because we
need to match non-constants to the shift by MMX register
instruction which we do by mutating the intrinsic id during
lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372537 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove stale FIXME.
Craig Topper [Mon, 23 Sep 2019 01:21:47 +0000 (01:21 +0000)]
[X86] Remove stale FIXME.

This goes back to when MMX was migrated to intrinsic only. The
hack referenced here has been gone for quite a while.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372536 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics...
Craig Topper [Mon, 23 Sep 2019 01:05:33 +0000 (01:05 +0000)]
[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics into the X86 backend.

This intrinsics should be shift by immediate, but gcc allows any
i32 scalar and clang needs to match that. So we try to detect the
non-constant case and move the data from an integer register to an
MMX register.

Previously this was done by creating a v2i32 build_vector and
bitcast in SelectionDAGBuilder. This had to be done early since
v2i32 isn't a legal type. The bitcast+build_vector would be DAG
combined to X86ISD::MMX_MOVW2D which isel will turn into a
GPR->MMX MOVD.

This commit just moves the whole thing to lowering and emits
the X86ISD::MMX_MOVW2D directly to avoid the illegal type. The
test changes just seem to be due to nodes being linearized in a
different order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372535 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to...
Craig Topper [Sun, 22 Sep 2019 23:48:50 +0000 (23:48 +0000)]
[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.

Update the isel patterns to use timm instead of imm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372534 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI...
Roman Lebedev [Sun, 22 Sep 2019 22:04:29 +0000 (22:04 +0000)]
[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI is profitable (PR43381)

Summary:
PR43381 notes that while we are good at matching `(X >> C1) & C2` as BEXTR/BEXTRI,
we only do that if we either have BEXTRI (TBM),
or if BEXTR is marked as being fast (`-mattr=+fast-bextr`).
In all other cases we don't match.

But that is mainly only true for AMD CPU's.
However, for all the CPU's for which we have sched models,
the BZHI is always fast (or the sched models are all bad.)

So if we decide that it's unprofitable to emit BEXTR/BEXTRI,
we should consider falling-back to BZHI if it is available,
and follow-up with the shift.

While it's really tempting to do something because it's cool
it is wise to first think whether it actually makes sense to do.
We shouldn't just use BZHI because we can, but only it it is beneficial.
In particular, it isn't really worth it if the input is a register,
mask is small, or we can fold a load.
But it is worth it if the mask does not fit into 32-bits.

(careful, i don't know much about intel cpu's, my choice of `-mcpu` may be bad here)
Thus we manage to fold a load:
https://godbolt.org/z/Er0OQz
Or if we'd end up using BZHI anyways because the mask is large:
https://godbolt.org/z/dBJ_5h
But this isn'r actually profitable in general case,
e.g. here we'd increase microop count
(the register renaming is free, mca does not model that there it seems)
https://godbolt.org/z/k6wFoz
Likewise, not worth it if we just get load folding:
https://godbolt.org/z/1M1deG

https://bugs.llvm.org/show_bug.cgi?id=43381

Reviewers: RKSimon, craig.topper, davezarzycki, spatel

Reviewed By: craig.topper, davezarzycki

Subscribers: andreadb, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67875

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372532 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoVerifier - silence static analyzer dyn_cast<VectorType> null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:23 +0000 (21:01 +0000)]
Verifier - silence static analyzer dyn_cast<VectorType> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<VectorType> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372529 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:13 +0000 (21:01 +0000)]
[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372528 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'
Craig Topper [Sun, 22 Sep 2019 20:08:57 +0000 (20:08 +0000)]
[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'

This seems to have completed omitted any check for the opcode
of the operand in the isel table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372526 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTa...
Craig Topper [Sun, 22 Sep 2019 19:49:39 +0000 (19:49 +0000)]
[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTarget opcodes from the X86 isel table.

We're now using a lot more TargetConstant nodes in SelectionDAG.
But we were still telling isel to convert some of them
to TargetConstants even though they already are. This is because
isel emits a conversion anytime the output pattern has a an 'imm'.
I guess for patterns in instructions we take the 'timm' from the
'set' pattern, but for Pat patterns with explcicit output we
previously had to say 'imm' since 'timm' wasn't allowed in outputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372525 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)
Roman Lebedev [Sun, 22 Sep 2019 19:36:38 +0000 (19:36 +0000)]
[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372524 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.
Craig Topper [Sun, 22 Sep 2019 19:06:13 +0000 (19:06 +0000)]
[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.

We need to match TargetConstant, not Constant. This was broken
in r372338, but we lacked test coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372523 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.
Craig Topper [Sun, 22 Sep 2019 19:06:08 +0000 (19:06 +0000)]
[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.

Some of the isel patterns were not updated to check for
TargetConstant instead of Constant in r372338.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372522 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths...
Simon Pilgrim [Sun, 22 Sep 2019 18:47:12 +0000 (18:47 +0000)]
[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths. NFCI.

Merge the calls, just adjust the demandedelts if we have a valid extract_subvector constant index, else demand all elts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372521 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning....
Simon Pilgrim [Sun, 22 Sep 2019 18:47:00 +0000 (18:47 +0000)]
[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372520 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 17:59:24 +0000 (17:59 +0000)]
[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.

Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372518 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 17:45:05 +0000 (17:45 +0000)]
ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372517 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Friendlier error on invalid entries in llvm_targets_to_build
Nico Weber [Sun, 22 Sep 2019 16:48:20 +0000 (16:48 +0000)]
gn build: Friendlier error on invalid entries in llvm_targets_to_build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372515 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Cost][X86] Add more missing vector truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 16:46:15 +0000 (16:46 +0000)]
[Cost][X86] Add more missing vector truncation costs

The AVX512 cases still need some work to correct recognise the PMOV truncation cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372514 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: consolidate "Nothing to do" branches in targets.gni
Nico Weber [Sun, 22 Sep 2019 15:42:40 +0000 (15:42 +0000)]
gn build: consolidate "Nothing to do" branches in targets.gni

No behavior change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372512 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)
Sanjay Patel [Sun, 22 Sep 2019 14:31:53 +0000 (14:31 +0000)]
[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

This has the potential to uncover missed analysis/folds as shown in the
min/max code comment/test, but fewer restrictions on icmp folds should
be better in general to solve cases like:
https://bugs.llvm.org/show_bug.cgi?id=43310

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372510 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for icmp fold hindered by min/max; NFC
Sanjay Patel [Sun, 22 Sep 2019 14:23:22 +0000 (14:23 +0000)]
[InstCombine] add tests for icmp fold hindered by min/max; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372509 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix uninitialized variable warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:43:21 +0000 (13:43 +0000)]
Fix uninitialized variable warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372508 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 13:43:12 +0000 (13:43 +0000)]
[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372507 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Add missing RISCV to llvm_targets_to_build="all"
Nico Weber [Sun, 22 Sep 2019 13:41:38 +0000 (13:41 +0000)]
gn build: Add missing RISCV to llvm_targets_to_build="all"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372506 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Add build files for llvm/lib/Target/AVR
Nico Weber [Sun, 22 Sep 2019 13:17:38 +0000 (13:17 +0000)]
gn build: Add build files for llvm/lib/Target/AVR

Differential Revision: https://reviews.llvm.org/D67872

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372505 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null deref...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:30 +0000 (13:14 +0000)]
[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372504 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:21 +0000 (13:14 +0000)]
[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings. NFCI.

We were already doing this dyn_cast && isa<> && cast<> pattern for some add*Operands methods, just do this more consistently to stop clang static analyzer warning so much.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372503 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:02:00 +0000 (13:02 +0000)]
[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372502 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:01:49 +0000 (13:01 +0000)]
AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372501 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:32 +0000 (12:38 +0000)]
[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372500 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:21 +0000 (12:38 +0000)]
[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.

The static analyzer is warning about potential null dereference, but we should be able to use cast<ConstantFPSDNode> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372499 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Cost][X86] Add v2i64 truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 12:04:38 +0000 (12:04 +0000)]
[Cost][X86] Add v2i64 truncation costs

We are missing costs for a lot of truncation cases, I'm hoping to address all the 'zero cost' cases in trunc.ll

I thought this was a vector widening side effect, but even before this we had some interesting LV decisions (notably over indvars) being made due to these zero costs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372498 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMove classes into anonymous namespaces. NFC.
Benjamin Kramer [Sun, 22 Sep 2019 09:28:47 +0000 (09:28 +0000)]
Move classes into anonymous namespaces. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372495 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add test memset and memcpy testcases for D67874. NFC
Craig Topper [Sun, 22 Sep 2019 06:52:25 +0000 (06:52 +0000)]
[X86] Add test memset and memcpy testcases for D67874. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372494 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0 --> Y == 0
Roman Lebedev [Sat, 21 Sep 2019 22:27:39 +0000 (22:27 +0000)]
[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0  -->  Y == 0

https://rise4fun.com/Alive/v9Y4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372491 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry
Roman Lebedev [Sat, 21 Sep 2019 22:27:28 +0000 (22:27 +0000)]
[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry

Only a single `X >= Y && Y == 0  -->  Y == 0` fold appears to be missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372490 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().
Roman Lebedev [Sat, 21 Sep 2019 22:27:18 +0000 (22:27 +0000)]
[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().

One case is not handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372489 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 21:05:20 +0000 (21:05 +0000)]
[Docs] Updates sidebar links

Adds sidebar links to mailing lists, IRC, and meetups and social events.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372488 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Adds new page for Getting Involved articles
DeForest Richards [Sat, 21 Sep 2019 20:56:40 +0000 (20:56 +0000)]
[Docs] Adds new page for Getting Involved articles

Adds a new page for existing Getting Involved, Development Process, and Community Proposals articles. Also moves Mailing Lists, Meetups and social events, and IRC sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372487 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header
Martin Storsjo [Sat, 21 Sep 2019 19:09:24 +0000 (19:09 +0000)]
[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

LLDB source files include intrin.h, and the MSVC intrin.h transitively
includes arm64intr.h, which has an ARM64_FPSR define, which clashes
with the enum declaration.

Differential Revision: https://reviews.llvm.org/D67864

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372481 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSROA: Check Total Bits of vector type
Suyog Sarda [Sat, 21 Sep 2019 18:16:37 +0000 (18:16 +0000)]
SROA: Check Total Bits of vector type

While Promoting alloca instruction of Vector Type,
Check total size in bits of its slices too.
If they don't match, don't promote the alloca instruction.

Bug : https://bugs.llvm.org/show_bug.cgi?id=42585

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372480 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTest mail. NFC.
Suyog Sarda [Sat, 21 Sep 2019 18:03:30 +0000 (18:03 +0000)]
Test mail. NFC.

Testing commit acces. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372479 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRecommit [SampleFDO] Expose an interface to return the size of a section
Wei Mi [Sat, 21 Sep 2019 17:23:55 +0000 (17:23 +0000)]
Recommit [SampleFDO] Expose an interface to return the size of a section
or the size of the profile for profile in ExtBinary format.

Fix a test failure on Mac.

[SampleFDO] Expose an interface to return the size of a section or the
size of the profile for profile in ExtBinary format.

Sometimes we want to limit the size of the profile by stripping some functions
with low sample count or by stripping some function names with small text size
from profile symbol list. That requires the profile reader to have the
interfaces returning the size of a section or the size of total profile. The
patch add those interfaces.

At the same time, add some dump facility to show the size of each section.

Differential revision: https://reviews.llvm.org/D67726

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372478 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Implement "norecurse" function attribute deduction
Hideto Ueno [Sat, 21 Sep 2019 15:13:19 +0000 (15:13 +0000)]
[Attributor] Implement "norecurse" function attribute deduction

Summary:
This patch introduces `norecurse` function attribute deduction.

`norecurse` will be deduced if the following conditions hold:
* The size of SCC in which the function belongs equals to 1.
* The function doesn't have self-recursion.
* We have `norecurse` for all call site.

To avoid a large change, SCC is calculated using scc_iterator in InfoCache initialization for now.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67751

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372475 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>
Fangrui Song [Sat, 21 Sep 2019 15:05:03 +0000 (15:05 +0000)]
[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>

The new constructor can simplify some llvm-readobj call sites.

Reviewed By: grimar, dblaikie

Differential Revision: https://reviews.llvm.org/D67797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372473 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Bug fix for document not included in toctree
DeForest Richards [Sat, 21 Sep 2019 14:29:19 +0000 (14:29 +0000)]
[Docs] Bug fix for document not included in toctree

Fixes 'document not included in toctree' bug for FAQ and Lexicon topics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372470 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 14:17:09 +0000 (14:17 +0000)]
[Docs] Updates sidebar links

Adds additional links to sidebar. Also removes Glossary and FAQ from LLVM Design & Overview section. (These links now reside on the sidebar.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372469 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][X86] Adjust check prefixes in bmi.ll (PR43381)
Roman Lebedev [Sat, 21 Sep 2019 11:12:55 +0000 (11:12 +0000)]
[NFC][X86] Adjust check prefixes in bmi.ll (PR43381)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372468 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>
Amara Emerson [Sat, 21 Sep 2019 09:21:16 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>

Simple continuation of existing selection support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372467 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>
Amara Emerson [Sat, 21 Sep 2019 09:21:13 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>

Just add an extra case to the existing selection logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372466 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal.
Amara Emerson [Sat, 21 Sep 2019 09:21:10 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372465 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[SampleFDO] Expose an interface to return the size of a section or the size"
Amara Emerson [Sat, 21 Sep 2019 09:11:51 +0000 (09:11 +0000)]
Revert "[SampleFDO] Expose an interface to return the size of a section or the size"

This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0.

Broke the macOS build/greendragon bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372464 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount
James Molloy [Sat, 21 Sep 2019 08:19:41 +0000 (08:19 +0000)]
[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

Recommit: fix asan errors.

The way MachinePipeliner uses these target hooks is stateful - we reduce trip
count by one per call to reduceLoopCount. It's a little overfit for hardware
loops, where we don't have to worry about stitching a loop induction variable
across prologs and epilogs (the induction variable is implicit).

This patch introduces a new API:

  /// Analyze loop L, which must be a single-basic-block loop, and if the
  /// conditions can be understood enough produce a PipelinerLoopInfo object.
  virtual std::unique_ptr<PipelinerLoopInfo>
  analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

The return value is expected to be an implementation of the abstract class:

  /// Object returned by analyzeLoopForPipelining. Allows software pipelining
  /// implementations to query attributes of the loop being pipelined.
  class PipelinerLoopInfo {
  public:
    virtual ~PipelinerLoopInfo();
    /// Return true if the given instruction should not be pipelined and should
    /// be ignored. An example could be a loop comparison, or induction variable
    /// update with no users being pipelined.
    virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

    /// Create a condition to determine if the trip count of the loop is greater
    /// than TC.
    ///
    /// If the trip count is statically known to be greater than TC, return
    /// true. If the trip count is statically known to be not greater than TC,
    /// return false. Otherwise return nullopt and fill out Cond with the test
    /// condition.
    virtual Optional<bool>
    createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                 SmallVectorImpl<MachineOperand> &Cond) = 0;

    /// Modify the loop such that the trip count is
    /// OriginalTC + TripCountAdjust.
    virtual void adjustTripCount(int TripCountAdjust) = 0;

    /// Called when the loop's preheader has been modified to NewPreheader.
    virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

    /// Called when the loop is being removed.
    virtual void disposed() = 0;
  };

The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
allowing the target to hold its own state across all calls. This API, in
particular the disjunction of creating a trip count check condition and
adjusting the loop, improves the code quality in ModuloSchedule.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372463 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.
Craig Topper [Sat, 21 Sep 2019 06:44:29 +0000 (06:44 +0000)]
[X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.

Previously we only matched scalar_to_vector and scalar load, but
we should be able to narrow a vector load or match vzload.

Also need to match TargetConstant instead of Constant. The register
patterns were previously updated, but not the memory patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372458 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add test case to show failure to fold load with getmantss due to isel pattern...
Craig Topper [Sat, 21 Sep 2019 06:44:24 +0000 (06:44 +0000)]
[X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant

The intrinsic has an immarg so its gets created with a TargetConstant
instead of a Constant after r372338. The isel pattern was only
updated for the register form, but not the memory form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372457 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoavr targetinfo: remove unneeded dep on MC
Nico Weber [Sat, 21 Sep 2019 02:43:32 +0000 (02:43 +0000)]
avr targetinfo: remove unneeded dep on MC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372451 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Allow selection of scalar min/max
Matt Arsenault [Sat, 21 Sep 2019 02:37:33 +0000 (02:37 +0000)]
AMDGPU/GlobalISel: Allow selection of scalar min/max

I believe all of the uniform/divergent pattern predicates are
redundant and can be removed. The uniformity bit already influences
the register class, and nothhing has broken when I've removed this and
others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372450 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoLiveIntervals: Add missing operator!= for segments
Matt Arsenault [Sat, 21 Sep 2019 02:37:28 +0000 (02:37 +0000)]
LiveIntervals: Add missing operator!= for segments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372449 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSupport for 64-bit PC-relative relocations for X86_64
Artur Pilipenko [Sat, 21 Sep 2019 01:37:14 +0000 (01:37 +0000)]
Support for 64-bit PC-relative relocations for X86_64

ELF files generated for X86_64 targets may contain 64-bit PC-relative
relocations. For instance, an exception handler table entry contains the start
of exception-throwing frame relative to the start of exception handler. As these
two labels belong to different sections, their difference and so the relocation
is 64-bit.

An attempt to parse such file, i.e. in DWARFContext::create, results in "failed
to compute relocation" error.

This fix adds support for such relocations to RelocationResolver.cpp.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D67779

Patch by Oleg Pliss (Oleg.Pliss@azul.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372447 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r372445
GN Sync Bot [Sat, 21 Sep 2019 01:27:09 +0000 (01:27 +0000)]
gn build: Merge r372445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372446 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GlobalISel] Defer setting HasCalls on MachineFrameInfo to selection time.
Amara Emerson [Fri, 20 Sep 2019 23:52:07 +0000 (23:52 +0000)]
[GlobalISel] Defer setting HasCalls on MachineFrameInfo to selection time.

We currently always set the HasCalls on MFI during translation and legalization if
we're handling a call or legalizing to a libcall. However, if that call is later
optimized to a tail call then we don't need the flag. The flag being set to true
causes frame lowering to always save and restore FP/LR, which adds unnecessary code.

This change does the same thing as SelectionDAG and ports over some code that scans
instructions after selection, using TargetInstrInfo to determine if target opcodes
are known calls.

Code size geomean improvements on CTMark:
 -O0 : 0.1%
 -Os : 0.3%

Differential Revision: https://reviews.llvm.org/D67868

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372443 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Inliner] Remove incorrect early exit during switch cost computation
Teresa Johnson [Fri, 20 Sep 2019 23:29:17 +0000 (23:29 +0000)]
[Inliner] Remove incorrect early exit during switch cost computation

Summary:
The CallAnalyzer::visitSwitchInst has an early exit when the estimated
lower bound of the switch cost will put the overall cost of the inline
above the threshold. However, this code is not correctly estimating the
lower bound for switches that can be transformed into bit tests, leading
to unnecessary lost inlines, and also differing behavior with
optimization remarks enabled.

First, the early exit is controlled by whether ComputeFullInlineCost is
enabled or not, and that in turn is disabled by default but enabled when
enabling -pass-remarks=missed. This by itself wouldn't lead to a
problem, except that as described below, the lower bound can be above
the real lower bound, so we can sometimes get different inline decisions
with inline remarks enabled, which is problematic.

The early exit was added in along with a new switch cost model in D31085.
The reason why this early exit was added is due to a concern one reviewer
raised about compile time for large switches:
https://reviews.llvm.org/D31085?id=94559#inline-276200

However, the code just below there calls
getEstimatedNumberOfCaseClusters, which in turn immediately calls
BasicTTIImpl getEstimatedNumberOfCaseClusters, which in the worst case
does a linear scan of the cases to get the high and low values. The
bit test handling in particular is guarded by whether the number of
cases fits into the max bit width. There is no suggestion that anyone
measured a compile time issue, it appears to be theoretical.

The problem is that the reviewer's comment about the lower bound
calculation is incorrect, specifically in the case of a switch that can
be lowered to a bit test. This isn't followed up on the comment
thread, but the author does add a FIXME to that effect above the early
exit added when they subsequently revised the patch.

As a result, we were incorrectly early exiting and not inlining
functions with switch statements that would be lowered to bit tests in
cases where we were nearing the threshold. Combined with the fact that
this early exit was skipped with opt remarks enabled, this caused
different inlining decisions to be made when -pass-remarks=missed is
enabled to debug the missing inline.

Remove the early exit for the above reasons.

I also copied over an existing AArch64 inlining test to X86, and
adjusted the threshold so that the bit test inline only occurs with the
fix in this patch.

Reviewers: davidxl

Subscribers: eraman, kristof.beyls, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67716

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372440 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SampleFDO] Expose an interface to return the size of a section or the size
Wei Mi [Fri, 20 Sep 2019 23:24:50 +0000 (23:24 +0000)]
[SampleFDO] Expose an interface to return the size of a section or the size
of the profile for profile in ExtBinary format.

Sometimes we want to limit the size of the profile by stripping some functions
with low sample count or by stripping some function names with small text size
from profile symbol list. That requires the profile reader to have the
interfaces returning the size of a section or the size of total profile. The
patch add those interfaces.

At the same time, add some dump facility to show the size of each section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372439 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SystemZ] Support z15 processor name
Ulrich Weigand [Fri, 20 Sep 2019 23:04:45 +0000 (23:04 +0000)]
[SystemZ] Support z15 processor name

The recently announced IBM z15 processor implements the architecture
already supported as "arch13" in LLVM.  This patch adds support for
"z15" as an alternate architecture name for arch13.

The patch also uses z15 in a number of places where we used arch13
as long as the official name was not yet announced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372435 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix missed case of switching getConstant to getTargetConstant. Try 2.
Sterling Augustine [Fri, 20 Sep 2019 22:26:55 +0000 (22:26 +0000)]
Fix missed case of switching getConstant to getTargetConstant. Try 2.

Summary: This fixes a crasher introduced by r372338.

Reviewers: echristo, arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67850

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372434 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Add a custom sidebar to doc pages
DeForest Richards [Fri, 20 Sep 2019 22:16:39 +0000 (22:16 +0000)]
[Docs] Add a custom sidebar to doc pages

Adds a custom sidebar to LLVM docs. Sidebar includes links to How to submit a bug and FAQ topics, as well as a Show Source link and search box.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372432 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PPC] PPCLoopPreIncPrep - silence static analyzer null dereference warning.
Simon Pilgrim [Fri, 20 Sep 2019 21:27:49 +0000 (21:27 +0000)]
[PPC] PPCLoopPreIncPrep - silence static analyzer null dereference warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372430 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AddressSanitizer] Don't dereference dyn_cast<ConstantInt> results. NFCI.
Simon Pilgrim [Fri, 20 Sep 2019 20:52:21 +0000 (20:52 +0000)]
[AddressSanitizer] Don't dereference dyn_cast<ConstantInt> results. NFCI.

The static analyzer is warning about potential null dereference, but we can use cast<ConstantInt> directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372429 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Move topics to new categories
DeForest Richards [Fri, 20 Sep 2019 20:51:33 +0000 (20:51 +0000)]
[Docs] Move topics to new categories

This commit moves several topics to new categories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372428 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][PowerPC] Consolidate testing of common linkage symbols
Jinsong Ji [Fri, 20 Sep 2019 20:31:37 +0000 (20:31 +0000)]
[NFC][PowerPC] Consolidate testing of common linkage symbols

Add a new file to test the code gen for common linkage symbol.
Remove common linkage in some other testcases to avoid distraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372426 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount"
Mitch Phillips [Fri, 20 Sep 2019 20:25:16 +0000 (20:25 +0000)]
Revert "[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount"

This commit broke the ASan buildbot. See comments in rL372376 for more
information.

This reverts commit 15e27b0b6d9d51362fad85dbe95ac5b3fadf0a06.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372425 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[docs] Update structure-aware-fuzzing link.
Matt Morehouse [Fri, 20 Sep 2019 19:39:50 +0000 (19:39 +0000)]
[docs] Update structure-aware-fuzzing link.

The document has been moved to the google/fuzzing GitHub repo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372423 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCan't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)
Michael Trent [Fri, 20 Sep 2019 19:13:24 +0000 (19:13 +0000)]
Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)

Summary:
Allow users to pass the path to a .dSYM directory to llvm-objdump's -dsym
flag rather than requiring users to find the DWARF DSYM Mach-O within the
bundle structure by hand.

rdar://46873333

Reviewers: pete, lhames, friss, aprantl

Reviewed By: pete, aprantl

Subscribers: MaskRay, aprantl, rupprecht, seiya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67780

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372421 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Mips] Remove immarg test for intrinsics that no longer have an immarg after r372409.
Craig Topper [Fri, 20 Sep 2019 18:52:49 +0000 (18:52 +0000)]
[Mips] Remove immarg test for intrinsics that no longer have an immarg after r372409.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372420 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix -Wdocumentation warning. NFCI.
Simon Pilgrim [Fri, 20 Sep 2019 18:21:31 +0000 (18:21 +0000)]
Fix -Wdocumentation warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372418 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][PowerPC] Refactor classifyGlobalReference
Jinsong Ji [Fri, 20 Sep 2019 18:21:07 +0000 (18:21 +0000)]
[NFC][PowerPC] Refactor classifyGlobalReference

We always(and only) check the NLP flag after calling
classifyGlobalReference to see whether it is accessed
indirectly.

Refactor to code to use isGVIndirectSym instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372417 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Fri, 20 Sep 2019 18:10:17 +0000 (18:10 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372416 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][InstCombine] Fixup newly-added tests
Roman Lebedev [Fri, 20 Sep 2019 17:43:46 +0000 (17:43 +0000)]
[NFC][InstCombine] Fixup newly-added tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372413 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MTE] Handle MTE instructions in AArch64LoadStoreOptimizer.
Evgeniy Stepanov [Fri, 20 Sep 2019 17:36:27 +0000 (17:36 +0000)]
[MTE] Handle MTE instructions in AArch64LoadStoreOptimizer.

Summary: Generate pre- and post-indexed forms of ST*G and STGP when possible.

Reviewers: ostannard, vitalybuka

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67741

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372412 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SelectionDAG][Mips][Sparc] Don't allow SimplifyDemandedBits to constant fold TargetC...
Craig Topper [Fri, 20 Sep 2019 16:49:51 +0000 (16:49 +0000)]
[SelectionDAG][Mips][Sparc] Don't allow SimplifyDemandedBits to constant fold TargetConstant nodes to a Constant.

Summary:
After the switch in SimplifyDemandedBits, it tries to create a
constant when possible. If the original node is a TargetConstant
the default in the switch will call computeKnownBits on the
TargetConstant which will succeed. This results in the
TargetConstant becoming a Constant. But TargetConstant exists to
avoid being changed.

I've fixed the two cases that relied on this in tree by explicitly
making the nodes constant instead of target constant. The Sparc
case is an old bug. The Mips case was recently introduced now that
ImmArg on intrinsics gets turned into a TargetConstant when the
SelectionDAG is created. I've removed the ImmArg since it lowers
to generic code.

Reviewers: arsenm, RKSimon, spatel

Subscribers: jyknight, sdardis, wdng, arichardson, hiraditya, fedor.sergeev, jrtc27, atanasyan, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372409 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[aarch64] add def-pats for dot product
Sebastian Pop [Fri, 20 Sep 2019 16:33:33 +0000 (16:33 +0000)]
[aarch64] add def-pats for dot product

This patch adds the patterns to select the dot product instructions.
Tested on aarch64-linux with make check-all.

Differential Revision: https://reviews.llvm.org/D67645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372408 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRemove assert from MachineLoop::getLoopPredecessor()
Stanislav Mekhanoshin [Fri, 20 Sep 2019 15:26:10 +0000 (15:26 +0000)]
Remove assert from MachineLoop::getLoopPredecessor()

According to the documentation method returns predecessor
if the given loop's header has exactly one unique predecessor
outside the loop. Otherwise return null.

In reality it asserts if there is no predecessor outside of
the loop.

The testcase has the loop where predecessors outside of the
loop were not identified as analyzeBranch() was unable to
process the mask branch and returned true. That is also not
correct to assert for the truly dead loops.

Differential Revision: https://reviews.llvm.org/D67634

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372405 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MVT] Add v256i1 to MachineValueType
Krzysztof Parzyszek [Fri, 20 Sep 2019 15:19:20 +0000 (15:19 +0000)]
[MVT] Add v256i1 to MachineValueType

This type can show up when lowering some HVX vector code on Hexagon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372403 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259)
Roman Lebedev [Fri, 20 Sep 2019 15:06:47 +0000 (15:06 +0000)]
[InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259)

https://rise4fun.com/Alive/knp
https://rise4fun.com/Alive/ALap

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372402 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM] Fix CTTZ not generating correct instructions MVE
Oliver Cruickshank [Fri, 20 Sep 2019 15:03:44 +0000 (15:03 +0000)]
[ARM] Fix CTTZ not generating correct instructions MVE

CTTZ intrinsic should have been set to Custom, not Expand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372401 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[docs] Remove training whitespaces. NFC
Francesco Petrogalli [Fri, 20 Sep 2019 15:02:32 +0000 (15:02 +0000)]
[docs] Remove training whitespaces. NFC

Subscribers: jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67835

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372399 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd a missing space in a MIR parser error message
David Stenberg [Fri, 20 Sep 2019 14:41:41 +0000 (14:41 +0000)]
Add a missing space in a MIR parser error message

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372398 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r372396
GN Sync Bot [Fri, 20 Sep 2019 14:39:52 +0000 (14:39 +0000)]
gn build: Merge r372396

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372397 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TextAPI] Arch&Platform to Target
Cyndy Ishida [Fri, 20 Sep 2019 14:32:34 +0000 (14:32 +0000)]
[TextAPI] Arch&Platform to Target

Summary:
This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform.
This is because in previous versions tbd files only supported a single platform but that is no longer the case,
so, now its tracked by unique triples.
This precedes a seperate patch that will add  the TBD-v4 format

Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai

Reviewed By: ributzka

Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67527

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372396 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoUse llvm::StringLiteral instead of StringRef in few places
Fangrui Song [Fri, 20 Sep 2019 14:31:42 +0000 (14:31 +0000)]
Use llvm::StringLiteral instead of StringRef in few places

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372395 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SLPVectorizer] add tests for bogus reductions; NFC
Sanjay Patel [Fri, 20 Sep 2019 14:17:00 +0000 (14:17 +0000)]
[SLPVectorizer] add tests for bogus reductions; NFC

https://bugs.llvm.org/show_bug.cgi?id=42708
https://bugs.llvm.org/show_bug.cgi?id=43146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372393 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Testing] Python 3 requires `print` to use parens
David Zarzycki [Fri, 20 Sep 2019 13:52:47 +0000 (13:52 +0000)]
[Testing] Python 3 requires `print` to use parens

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372392 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[RISCV] Fix static analysis issues
Luis Marques [Fri, 20 Sep 2019 13:48:02 +0000 (13:48 +0000)]
[RISCV] Fix static analysis issues

Unlikely to be problematic but still worth fixing.

Differential Revision: https://reviews.llvm.org/D67640

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372391 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] migrate DataLayout internal struct to llvm::Align
Guillaume Chatelet [Fri, 20 Sep 2019 13:40:31 +0000 (13:40 +0000)]
[Alignment][NFC] migrate DataLayout internal struct to llvm::Align

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

With this patch the PointerAlignElem struct goes from 20B to 16B.

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67400

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372390 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FastISel] Fix insertion of unconditional branches during FastISel
David Tellenbach [Fri, 20 Sep 2019 13:22:59 +0000 (13:22 +0000)]
[FastISel] Fix insertion of unconditional branches during FastISel

The insertion of an unconditional branch during FastISel can differ depending on
building with or without debug information. This happens because FastISel::fastEmitBranch
emits an unconditional branch depending on the size of the current basic block
without distinguishing between debug and non-debug instructions.

This patch fixes this issue by ignoring debug instructions when getting the size
of the basic block.

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: ormris, aprantl, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67703

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372389 91177308-0d34-0410-b5e6-96231b3b80d8