OSDN Git Service

android-x86/external-llvm.git
6 years ago[ValueTracking] simplify code in CannotBeNegativeZero() with match(); NFCI
Sanjay Patel [Mon, 13 Nov 2017 17:40:47 +0000 (17:40 +0000)]
[ValueTracking] simplify code in CannotBeNegativeZero() with match(); NFCI

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

6 years ago[Reassociate] add tests with 'reassoc' FMF; NFC
Sanjay Patel [Mon, 13 Nov 2017 17:29:11 +0000 (17:29 +0000)]
[Reassociate] add tests with 'reassoc' FMF; NFC

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

6 years agoAMDGPU: Drop duplicate setOperationAction
Jan Vesely [Mon, 13 Nov 2017 16:46:07 +0000 (16:46 +0000)]
AMDGPU: Drop duplicate setOperationAction

These are set with other scalar int ops few lines up

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

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

6 years ago[SCEV] Handling for ICmp occuring in the evolution chain.
Jatin Bhateja [Mon, 13 Nov 2017 16:43:24 +0000 (16:43 +0000)]
[SCEV] Handling for ICmp occuring in the evolution chain.

Summary:
 If a compare instruction is same or inverse of the compare in the
 branch of the loop latch, then return a constant evolution node.
 This shall facilitate computations of loop exit counts in cases
 where compare appears in the evolution chain of induction variables.

 Will fix PR 34538

Reviewers: sanjoy, hfinkel, junryoungju

Reviewed By: sanjoy, junryoungju

Subscribers: javed.absar, llvm-commits

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

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

6 years agoRevert "[CodeGenPrepare] Check that erased sunken address are not reused"
Simon Dardis [Mon, 13 Nov 2017 16:41:17 +0000 (16:41 +0000)]
Revert "[CodeGenPrepare] Check that erased sunken address are not reused"

This reverts commit r318032. The test broke some sanitizer bots.

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

6 years ago[ARM GlobalISel] Update legalizer test
Diana Picus [Mon, 13 Nov 2017 16:02:42 +0000 (16:02 +0000)]
[ARM GlobalISel] Update legalizer test

Make one of the legalizer tests a bit more robust by making sure all
values we're interested in are used (either in a store or a return) and
by using loads instead of constants for obtaining values on fewer than
32 bits. This should make the test less fragile to changes in the
legalize combiner, since those loads are legal (as opposed to the
constants, which were being widened and thus produced opportunities for
the legalize combiner).

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

6 years ago[PowerPC][msan] Update msan to handle changed memory layouts in newer kernels
Bill Seurer [Mon, 13 Nov 2017 15:43:19 +0000 (15:43 +0000)]
[PowerPC][msan] Update msan to handle changed memory layouts in newer kernels

In more recent Linux kernels (including those with 47 bit VMAs) the layout of
virtual memory for powerpc64 changed causing the memory sanitizer to not
work properly. This patch adjusts a bit mask in the memory sanitizer to work
on the newer kernels while continuing to work on the older ones as well.

This is the non-runtime part of the patch and finishes it. ref: r317802

Tested on several 4.x and 3.x kernel releases.

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

6 years agoInserting a base test for X86 performance nops
Omer Paparo Bivas [Mon, 13 Nov 2017 15:02:39 +0000 (15:02 +0000)]
Inserting a base test for X86 performance nops

Change-Id: I69da08b617d7fae8024c5aee04720eb465f39b81

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

6 years ago[X86] test/testn intrinsics lowering to IR. llvm part.
Uriel Korach [Mon, 13 Nov 2017 12:51:18 +0000 (12:51 +0000)]
[X86] test/testn intrinsics lowering to IR. llvm part.

Remove builtins from llvm and add AutoUpgrade support.
Also add fast-isel tests for the TEST and TESTN instructions.

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

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

6 years agoMove the setting of LLVM_BUILD_MODE to a macro so that we can re-use it in compiler-rt
Greg Bedwell [Mon, 13 Nov 2017 12:40:05 +0000 (12:40 +0000)]
Move the setting of LLVM_BUILD_MODE to a macro so that we can re-use it in compiler-rt

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

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

6 years ago[ARM] Place jump table as the first operand in additions
Momchil Velikov [Mon, 13 Nov 2017 11:56:48 +0000 (11:56 +0000)]
[ARM] Place jump table as the first operand in additions

When generating table jump code for switch statements, place the jump
table label as the first operand in the various addition instructions
in order to enable addressing mode selectors to better match index
computation and possibly fold them into the addressing mode of the
table entry load instruction.

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

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

6 years ago[CodeGenPrepare] Check that erased sunken address are not reused
Simon Dardis [Mon, 13 Nov 2017 11:47:21 +0000 (11:47 +0000)]
[CodeGenPrepare] Check that erased sunken address are not reused

CodeGenPrepare sinks address computations from one basic block to another
and attempts to reuse address computations that have already been sunk. If
the same address computation appears twice with the first instance as an
operand of a load whose result is an operand to a simplifable select,
CodeGenPrepare simplifies the select and recursively erases the now dead
instructions. CodeGenPrepare then attempts to use the erased address
computation for the second load.

Fix this by erasing the cached address value if it has zero uses before
looking for the address value in the sunken address map.

This partially resolves PR35209.

Thanks to Alexander Richardson for reporting the issue!

Reviewers: john.brawn

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

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

6 years ago[CodeExtractor] Add missing AllowVarArgs initialization.
Florian Hahn [Mon, 13 Nov 2017 11:08:47 +0000 (11:08 +0000)]
[CodeExtractor] Add missing AllowVarArgs initialization.

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

6 years ago[PartialInliner] Inline vararg functions that forward varargs.
Florian Hahn [Mon, 13 Nov 2017 10:35:52 +0000 (10:35 +0000)]
[PartialInliner] Inline vararg functions that forward varargs.

Summary:
This patch extends the partial inliner to support inlining parts of
vararg functions, if the vararg handling is done in the outlined part.

It adds a `ForwardVarArgsTo` argument to InlineFunction. If it is
non-null, all varargs passed to the inlined function will be added to
all calls to `ForwardVarArgsTo`.

The partial inliner takes care to only pass `ForwardVarArgsTo` if the
varargs handing is done in the outlined function. It checks that vastart
is not part of the function to be inlined.

`test/Transforms/CodeExtractor/PartialInlineNoInline.ll` (already part
of the repo) checks we do not do partial inlining if vastart is used in
a basic block that will be inlined.

Reviewers: davide, davidxl, grosser

Reviewed By: davide, davidxl, grosser

Subscribers: gyiu, grosser, eraman, llvm-commits

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

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

6 years agoTest commit
Sander de Smalen [Mon, 13 Nov 2017 09:57:20 +0000 (09:57 +0000)]
Test commit

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

6 years ago[x86][AVX512] Lowering shuffle i/f intrinsics to LLVM IR
Jina Nahias [Mon, 13 Nov 2017 09:16:39 +0000 (09:16 +0000)]
[x86][AVX512] Lowering shuffle i/f intrinsics to LLVM IR

This patch, together with a matching clang patch (https://reviews.llvm.org/D38672), implements the lowering of X86 shuffle i/f intrinsics to IR.

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

Change-Id: I1e7d359a74743e995ec356237a85214ce55d3661

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

6 years ago[X86][SKX] Adding scheduling info of non-intrinsic + commutable SKX opcodes.
Gadi Haber [Mon, 13 Nov 2017 08:42:07 +0000 (08:42 +0000)]
[X86][SKX] Adding scheduling info of non-intrinsic + commutable SKX opcodes.

Updated the scheduling information of the SKX subtarget  in the file X86SchedSkylakeServer.td under lib/Target/X86 to:
1. add regular opcodes in addition to the suffixed "_Int" opcodes
2. add the (V)MAXCPD/MAXCPS/MAXCSD/MAXCSS/MINCPD/MINCPS/MINCSD/MINCSS
    instructions that are equivalent to their counterparts without the 'C' as they are part of a hack to
    make floating point min/max commutable under fast math.

Reviewers: zvi, RKSimon, craig.topper
Differential Revision: https://reviews.llvm.org/D39833

Change-Id: Ie13702a5ce1b1a08af91ca637a52b6962881e7d6

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

6 years ago[X86] Limit NOPs to 7 bytes when 'slm' is spelled 'silvermont'.
Craig Topper [Mon, 13 Nov 2017 08:17:30 +0000 (08:17 +0000)]
[X86] Limit NOPs to 7 bytes when 'slm' is spelled 'silvermont'.

We support 2 spelling for silvermont and we should accept both here.

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

6 years ago[X86] Use sse_load_f32/f64 to improve load folding of scalar vfscalefss/sd, vrcp14ss...
Craig Topper [Mon, 13 Nov 2017 08:07:33 +0000 (08:07 +0000)]
[X86] Use sse_load_f32/f64 to improve load folding of scalar vfscalefss/sd, vrcp14ss/sd, rsqrt14ss/sd instructions.

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

6 years ago[X86] Regenerate test. NFC
Craig Topper [Mon, 13 Nov 2017 08:07:31 +0000 (08:07 +0000)]
[X86] Regenerate test. NFC

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

6 years agoMI: Print ranges on MMO
Matt Arsenault [Mon, 13 Nov 2017 07:09:20 +0000 (07:09 +0000)]
MI: Print ranges on MMO

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

6 years ago[X86] Use sse_load_f32/f64 to improve load folding for scalar VFPCLASS intrinsics.
Craig Topper [Mon, 13 Nov 2017 06:46:48 +0000 (06:46 +0000)]
[X86] Use sse_load_f32/f64 to improve load folding for scalar VFPCLASS intrinsics.

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

6 years ago[X86] Add tests for missed opportunities to fold a 128-bit vector load into vfpclasss...
Craig Topper [Mon, 13 Nov 2017 06:46:46 +0000 (06:46 +0000)]
[X86] Add tests for missed opportunities to fold a 128-bit vector load into vfpclassss and vpfpclasssd.

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

6 years agoAMDGPU: Preserve nuw in shl add ptr combine
Matt Arsenault [Mon, 13 Nov 2017 05:33:35 +0000 (05:33 +0000)]
AMDGPU: Preserve nuw in shl add ptr combine

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

6 years ago[X86] Fix SQRTSS/SQRTSD/RCPSS/RCPSD intrinsics to use sse_load_f32/sse_load_f64 to...
Craig Topper [Mon, 13 Nov 2017 05:25:24 +0000 (05:25 +0000)]
[X86] Fix SQRTSS/SQRTSD/RCPSS/RCPSD intrinsics to use sse_load_f32/sse_load_f64 to increase load folding opportunities.

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

6 years ago[X86] Add tests for full vector loads to fold-load-unops.ll.
Craig Topper [Mon, 13 Nov 2017 05:25:23 +0000 (05:25 +0000)]
[X86] Add tests for full vector loads to fold-load-unops.ll.

We should be able to fold a full vector load into a scalar intrinsic. Since it's legal to narrow a load.

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

6 years ago[X86] Regenerate fold-load-unops.ll and add and avx512f command line.
Craig Topper [Mon, 13 Nov 2017 05:25:21 +0000 (05:25 +0000)]
[X86] Regenerate fold-load-unops.ll and add and avx512f command line.

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

6 years agoAMDGPU: Fix multi-use shl/add combine
Matt Arsenault [Mon, 13 Nov 2017 05:11:54 +0000 (05:11 +0000)]
AMDGPU: Fix multi-use shl/add combine

This was using a custom function that didn't handle the
addressing modes properly for private. Use
isLegalAddressingMode to avoid duplicating this.

Additionally, skip the combine if there is only one use
since the standard combine will handle it.

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

6 years ago[X86] Attempt to fix signed and unsigned comparison warning.
Craig Topper [Mon, 13 Nov 2017 02:19:13 +0000 (02:19 +0000)]
[X86] Attempt to fix signed and unsigned comparison warning.

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

6 years ago[X86] Use sse_load_f32/f64 in patterns for the memory forms of VRNDSCALESS/SD.
Craig Topper [Mon, 13 Nov 2017 02:03:01 +0000 (02:03 +0000)]
[X86] Use sse_load_f32/f64 in patterns for the memory forms of VRNDSCALESS/SD.

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

6 years ago[X86] Use EVEX encoded VRNDSCALE instructions to implement the legacy round intrinsics.
Craig Topper [Mon, 13 Nov 2017 02:03:00 +0000 (02:03 +0000)]
[X86] Use EVEX encoded VRNDSCALE instructions to implement the legacy round intrinsics.

The VRNDSCALE instructions implement a superset of the (V)ROUND instructions. They are equivalent if the upper 4-bits of the immediate are 0.

This patch lowers the legacy intrinsics to the VRNDSCALE ISD node and masks the upper bits of the immediate to 0. This allows us to take advantage of the larger register encoding space.

We should maybe consider converting VRNDSCALE back to VROUND in the EVEX to VEX pass if the extended registers are not being used.

I notice some load folding opportunities being missed for the VRNDSCALESS/SD instructions that I'll try to fix in future patches.

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

6 years ago[X86] Split VRNDSCALE/VREDUCE/VGETMANT/VRANGE ISD nodes into versions with and withou...
Craig Topper [Mon, 13 Nov 2017 02:02:58 +0000 (02:02 +0000)]
[X86] Split VRNDSCALE/VREDUCE/VGETMANT/VRANGE ISD nodes into versions with and without the rounding operand. NFCI

I want to reuse the VRNDSCALE node for the legacy SSE rounding intrinsics so that those intrinsics can use EVEX instructions. All of these nodes share tablegen multiclasses so I split them all so that they all remain similar in their implementations.

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

6 years agoFix some misc. -enable-var-scope violations
Matt Arsenault [Mon, 13 Nov 2017 01:47:52 +0000 (01:47 +0000)]
Fix some misc. -enable-var-scope violations

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

6 years agoAMDGPU: Select d16 loads into low component of register
Matt Arsenault [Mon, 13 Nov 2017 00:22:09 +0000 (00:22 +0000)]
AMDGPU: Select d16 loads into low component of register

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

6 years agoAMDGPU: Fix -enable-var-scope violations
Matt Arsenault [Sun, 12 Nov 2017 23:53:44 +0000 (23:53 +0000)]
AMDGPU: Fix -enable-var-scope violations

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

6 years agoAMDGPU: Fix missing gfx9 atomic inc/dec tests
Matt Arsenault [Sun, 12 Nov 2017 23:40:12 +0000 (23:40 +0000)]
AMDGPU: Fix missing gfx9 atomic inc/dec tests

The global instructions weren't tested. Plus there
were also some -enable-var-scope violations and
broken check prefixes.

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

6 years ago[X86] Add an X86ISD::RANGES opcode to use for the scalar intrinsics.
Craig Topper [Sun, 12 Nov 2017 18:51:09 +0000 (18:51 +0000)]
[X86] Add an X86ISD::RANGES opcode to use for the scalar intrinsics.

This fixes a bug where we selected packed instructions for scalar intrinsics.

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

6 years ago[X86] Add test cases and command lines demonstrating how we accidentally select vrang...
Craig Topper [Sun, 12 Nov 2017 18:51:08 +0000 (18:51 +0000)]
[X86] Add test cases and command lines demonstrating how we accidentally select vrangeps/vrangepd from vrangess/vrangesd instrinsics when the rounding mode is CUR_DIRECTION

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

6 years ago[X86] Remove some no longer needed intrinsic lowering code.
Craig Topper [Sun, 12 Nov 2017 18:51:06 +0000 (18:51 +0000)]
[X86] Remove some no longer needed intrinsic lowering code.

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

6 years ago[llvm] Remove redundant return [NFC]
Mandeep Singh Grang [Sun, 12 Nov 2017 03:47:50 +0000 (03:47 +0000)]
[llvm] Remove redundant return [NFC]

Reviewers: davidxl, olista01, Eugene.Zelenko

Reviewed By: Eugene.Zelenko

Subscribers: sdardis, javed.absar, llvm-commits

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

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

6 years ago[InstCombine] Teach visitICmpInst to not break integer absolute value idioms
Craig Topper [Sun, 12 Nov 2017 02:28:21 +0000 (02:28 +0000)]
[InstCombine] Teach visitICmpInst to not break integer absolute value idioms

Summary:
This patch adds an early out to visitICmpInst if we are looking at a compare as part of an integer absolute value idiom. Similar is already done for min/max.

In the particular case I observed in a benchmark we had an absolute value of a load from an indexed global. We simplified the compare using foldCmpLoadFromIndexedGlobal into a magic bit vector, a shift, and an and. But the load result was still used for the select and the negate part of the absolute valute idiom. So we overcomplicated the code and lost the ability to recognize it as an absolute value.

I've chosen a simpler case for the test here.

Reviewers: spatel, davide, majnemer

Reviewed By: spatel

Subscribers: llvm-commits

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

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

6 years ago[X86] Use vrndscaleps/pd for 128/256 ffloor/ftrunc/fceil/fnearbyint/frint when avx512...
Craig Topper [Sat, 11 Nov 2017 21:44:51 +0000 (21:44 +0000)]
[X86] Use vrndscaleps/pd for 128/256 ffloor/ftrunc/fceil/fnearbyint/frint when avx512vl is enabled.

This matches what we do for scalar and 512-bit types.

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

6 years ago[X86] Remove avx512-round.ll. The 512-bit rounding tests are now in vec_floor.ll...
Craig Topper [Sat, 11 Nov 2017 21:44:50 +0000 (21:44 +0000)]
[X86] Remove avx512-round.ll. The 512-bit rounding tests are now in vec_floor.ll with 128/256 sizes.

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

6 years ago[X86] Add avx512vl command line to vec_floor.ll. Add 512-bit test cases.
Craig Topper [Sat, 11 Nov 2017 21:44:49 +0000 (21:44 +0000)]
[X86] Add avx512vl command line to vec_floor.ll. Add 512-bit test cases.

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

6 years ago[X86] Add avx512f command line to rounding-ops.ll
Craig Topper [Sat, 11 Nov 2017 21:44:48 +0000 (21:44 +0000)]
[X86] Add avx512f command line to rounding-ops.ll

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

6 years ago[X86] Regenerate rounding-ops.ll with update_llc_test_checks.py
Craig Topper [Sat, 11 Nov 2017 21:44:47 +0000 (21:44 +0000)]
[X86] Regenerate rounding-ops.ll with update_llc_test_checks.py

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

6 years ago[X86] Attempt to match multiple binary reduction ops at once. NFCI
Simon Pilgrim [Sat, 11 Nov 2017 18:16:55 +0000 (18:16 +0000)]
[X86] Attempt to match multiple binary reduction ops at once. NFCI

matchBinOpReduction currently matches against a single opcode, but we already have a case where we repeat calls to try to match against AND/OR and I'll be shortly adding another case for SMAX/SMIN/UMAX/UMIN (D39729).

This NFCI patch alters matchBinOpReduction to try and pattern match against any of the provided list of candidate bin ops at once to save time.

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

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

6 years ago[X86] Add scalar register class versions of VRNDSCALE instructions and rename the...
Craig Topper [Sat, 11 Nov 2017 08:24:15 +0000 (08:24 +0000)]
[X86] Add scalar register class versions of VRNDSCALE instructions and rename the existing versions to _Int.

This is consistent with out normal implementation of scalar instructions.

While there disable load folding for the patterns with IMPLICIT_DEF unless optimizing for size which is also our standard practice.

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

6 years ago[X86] Regenerate avx512-round.ll test.
Craig Topper [Sat, 11 Nov 2017 08:24:13 +0000 (08:24 +0000)]
[X86] Regenerate avx512-round.ll test.

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

6 years ago[X86] Inline some SDNode operand multiclass operands that don't vary. NFC
Craig Topper [Sat, 11 Nov 2017 08:24:12 +0000 (08:24 +0000)]
[X86] Inline some SDNode operand multiclass operands that don't vary. NFC

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

6 years ago[X86] Set the execution domain for VFPCLASS to SSEPackedSingle/Double.
Craig Topper [Sat, 11 Nov 2017 06:57:44 +0000 (06:57 +0000)]
[X86] Set the execution domain for VFPCLASS to SSEPackedSingle/Double.

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

6 years ago[X86] Set the execution domain for vptest instruction to the integer domain.
Craig Topper [Sat, 11 Nov 2017 06:19:12 +0000 (06:19 +0000)]
[X86] Set the execution domain for vptest instruction to the integer domain.

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

6 years ago[globalisel][tablegen] Import signextload and zeroextload.
Daniel Sanders [Sat, 11 Nov 2017 03:23:44 +0000 (03:23 +0000)]
[globalisel][tablegen] Import signextload and zeroextload.

Allow a pattern rewriter to be installed in CodeGenDAGPatterns and use it to
correct situations where SelectionDAG and GlobalISel disagree on
representation. For example, it would rewrite:
  (sextload:i32 $ptr)<<unindexedload>><<sextload>><<sextloadi16>
to:
  (sext:i32 (load:i16 $ptr)<<unindexedload>>)

I'd have preferred to replace the fragments and have the expansion happen
naturally as part of PatFrag expansion but the type inferencing system can't
cope with loads of types narrower than those mentioned in register classes.
This is because the SDTCisInt's on the sext constrain both the result and
operand to the 'legal' integer types (where legal is defined as 'a register
class can contain the type') which immediately rules the narrower types out.
Several targets (those with only one legal integer type) would then go on to
crash on the SDTCisOpSmallerThanOp<> when it removes all the possible types
for the result of the extend.

Also, improve isObviouslySafeToFold() slightly to automatically return true for
neighbouring instructions. There can't be any re-ordering problems if
re-ordering isn't happenning. We'll need to improve it further to handle
sign/zero-extending loads when the extend and load aren't immediate neighbours
though.

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

6 years ago[X86] Correct the execution domain on ROUND/VROUND instructions.
Craig Topper [Sat, 11 Nov 2017 02:26:05 +0000 (02:26 +0000)]
[X86] Correct the execution domain on ROUND/VROUND instructions.

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

6 years ago[X86] Remove the default for one of the arguments to some tablegen multiclasses. NFC
Craig Topper [Sat, 11 Nov 2017 02:26:02 +0000 (02:26 +0000)]
[X86] Remove the default for one of the arguments to some tablegen multiclasses. NFC

No one ever uses this default and probably shouldn't since it sets the execution domain to generic.

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

6 years agollvm/Support/TargetParser.h: Fix -fmodules build in rL317900.
NAKAMURA Takumi [Sat, 11 Nov 2017 02:05:47 +0000 (02:05 +0000)]
llvm/Support/TargetParser.h: Fix -fmodules build in rL317900.

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

6 years ago[AMDGPU] Correct targets that support XNACK
Tony Tye [Sat, 11 Nov 2017 00:50:32 +0000 (00:50 +0000)]
[AMDGPU] Correct targets that support XNACK

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

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

6 years ago[SelectionDAG] Make getUniformBase in SelectionDAGBuilder fail if any of the middle...
Craig Topper [Fri, 10 Nov 2017 23:36:56 +0000 (23:36 +0000)]
[SelectionDAG] Make getUniformBase in SelectionDAGBuilder fail if any of the middle GEP indices are non-constant.

This is a fix for a bug in r317947. We were supposed to check that all the indices are are constant 0, but instead we're only make sure that indices that are constant are 0. Non-constant indices are being ignored.

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

6 years agoUpdate test_debuginfo.pl script to point to new tree location.
Zachary Turner [Fri, 10 Nov 2017 23:13:14 +0000 (23:13 +0000)]
Update test_debuginfo.pl script to point to new tree location.

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

6 years ago[SelectionDAG] Teach SelectionDAGBuilder's getUniformBase for gather/scatter handling...
Craig Topper [Fri, 10 Nov 2017 22:50:50 +0000 (22:50 +0000)]
[SelectionDAG] Teach SelectionDAGBuilder's getUniformBase for gather/scatter handling to accept GEPs with more than 2 operands if the middle operands are all 0s

Currently we can only get a uniform base from a simple GEP with 2 operands. This causes us to miss address folding opportunities for simple global array accesses as the test case shows.

This patch adds support for larger GEPs if the other indices are 0 since those don't require any additional computations to be inserted.

We may also want to handle constant splats of zero here, but I'm leaving that for future work when I have a real world example.

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

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

6 years ago[asan] Use dynamic shadow on 32-bit Android.
Evgeniy Stepanov [Fri, 10 Nov 2017 22:27:48 +0000 (22:27 +0000)]
[asan] Use dynamic shadow on 32-bit Android.

Summary:
The following kernel change has moved ET_DYN base to 0x4000000 on arm32:
https://marc.info/?l=linux-kernel&m=149825162606848&w=2

Switch to dynamic shadow base to avoid such conflicts in the future.

Reserve shadow memory in an ifunc resolver, but don't use it in the instrumentation
until PR35221 is fixed. This will eventually let use save one load per function.

Reviewers: kcc

Subscribers: aemerson, srhines, kubamracek, kristof.beyls, hiraditya, llvm-commits

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

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

6 years ago[llvm-cvtres] Add support for ARM64
Martin Storsjo [Fri, 10 Nov 2017 22:27:41 +0000 (22:27 +0000)]
[llvm-cvtres] Add support for ARM64

Also change some default cases into llvm_unreachable in
WindowsResourceCOFFWriter, to make it easier to find if they
are triggerd from within e.g. lld, which supported ARM64 earlier
than llvm-cvtres did.

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

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

6 years ago[cfi-verify] Made FileAnalysis operate on a GraphResult rather than build one and...
Mitch Phillips [Fri, 10 Nov 2017 21:00:22 +0000 (21:00 +0000)]
[cfi-verify] Made FileAnalysis operate on a GraphResult rather than build one and validate it.

Refactors the behaviour of building graphs out of FileAnalysis, allowing for analysis of the GraphResult by the callee without having to rebuild the graph. Means when we want to analyse the constructed graph (planned for later revisions), we don't do repeated work.

Also makes CFI verification in FileAnalysis now return an enum that allows us to differentiate why something failed, not just that it did/didn't fail.

Reviewers: vlad.tsyrklevich

Subscribers: kcc, pcc, llvm-commits

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

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

6 years ago[DAGcombine] Do not replace truncate node by itself when doing constant folding,...
Amaury Sechet [Fri, 10 Nov 2017 20:59:53 +0000 (20:59 +0000)]
[DAGcombine] Do not replace truncate node by itself when doing constant folding, this trigger needless extra rounds of combine for nothing. NFC

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

6 years ago[debuginfo-tests] Make debuginfo-tests work in a standard configuration.
Zachary Turner [Fri, 10 Nov 2017 20:57:57 +0000 (20:57 +0000)]
[debuginfo-tests] Make debuginfo-tests work in a standard configuration.

Previously, debuginfo-tests was expected to be checked out into
clang/test and then the tests would automatically run as part of
check-clang.  This is not a standard workflow for handling
external projects, and it brings with it some serious drawbacks
such as the inability to depend on things other than clang, which
we will need going forward.

The goal of this patch is to migrate towards a more standard
workflow.  To ease the transition for build bot maintainers,
this patch tries not to break the existing workflow, but instead
simply deprecate it to give maintainers a chance to update
the build infrastructure.

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

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

6 years ago[AMDGPU] AMDGPUUsage.rst minor corrections
Tony Tye [Fri, 10 Nov 2017 20:51:43 +0000 (20:51 +0000)]
[AMDGPU] AMDGPUUsage.rst minor corrections

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

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

6 years ago[SimplifyCFG] Use auto * when the type is obvious. NFCI.
Davide Italiano [Fri, 10 Nov 2017 20:46:21 +0000 (20:46 +0000)]
[SimplifyCFG] Use auto * when the type is obvious. NFCI.

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

6 years agoRecommit r317904: [Hexagon] Create HexagonISelDAGToDAG.h, NFC
Krzysztof Parzyszek [Fri, 10 Nov 2017 20:09:46 +0000 (20:09 +0000)]
Recommit r317904: [Hexagon] Create HexagonISelDAGToDAG.h, NFC

The Windows builder did not reconstruct the HexagonGenDAGISel.inc file
after the TableGen binary has changed.

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

6 years agoAMDGPU/NFC: Split Processors.td into GCNProcessors.td and R600Processors.td
Konstantin Zhuravlyov [Fri, 10 Nov 2017 20:01:58 +0000 (20:01 +0000)]
AMDGPU/NFC: Split Processors.td into GCNProcessors.td and R600Processors.td

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

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

6 years agoExpand IRBuilder interface for atomic memcpy to require pointer alignments. (NFC)
Daniel Neilson [Fri, 10 Nov 2017 19:38:12 +0000 (19:38 +0000)]
Expand IRBuilder interface for atomic memcpy to require pointer alignments. (NFC)

Summary:
 The specification of the @llvm.memcpy.element.unordered.atomic intrinsic requires
that the pointer arguments have alignments of at least the element size. The existing
IRBuilder interface to create a call to this intrinsic does not allow for providing
the alignment of these pointer args. Having an interface that makes it easy to
construct invalid intrinsic calls doesn't seem sensible, so this patch simply
adds the requirement that one provide the argument alignments when using IRBuilder
to create atomic memcpy calls.

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

6 years agoRevert "[Hexagon] Create HexagonISelDAGToDAG.h, NFC"
Krzysztof Parzyszek [Fri, 10 Nov 2017 19:27:18 +0000 (19:27 +0000)]
Revert "[Hexagon] Create HexagonISelDAGToDAG.h, NFC"

This reverts r317904: broke Windows build.

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

6 years ago[X86] Merge the template method selectAddrOfGatherScatterNode into selectVectorAddr...
Craig Topper [Fri, 10 Nov 2017 19:26:04 +0000 (19:26 +0000)]
[X86] Merge the template method selectAddrOfGatherScatterNode into selectVectorAddr. NFCI

Just need to initialize a couple variables differently based on the node type. No need for a whole separate template method.

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

6 years agoAdd back target triple to test which I accidentally removed.
Adrian Prantl [Fri, 10 Nov 2017 19:22:02 +0000 (19:22 +0000)]
Add back target triple to test which I accidentally removed.

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

6 years ago[CVP] Remove some {s|u}add.with.overflow checks.
Sanjoy Das [Fri, 10 Nov 2017 19:13:35 +0000 (19:13 +0000)]
[CVP] Remove some {s|u}add.with.overflow checks.

Summary:
This adds logic to CVP to remove some overflow checks.  It uses LVI to remove
operations with at least one constant.  Specifically, this can remove many
overflow intrinsics immediately following an overflow check in the source code,
such as:

if (x < INT_MAX)
    ... x + 1 ...

Patch by Joel Galenson!

Reviewers: sanjoy, regehr

Reviewed By: sanjoy

Subscribers: fhahn, pirama, srhines, llvm-commits

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

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

6 years ago[RISCV] Silence an unused variable warning in release builds [NFC]
Mandeep Singh Grang [Fri, 10 Nov 2017 19:09:28 +0000 (19:09 +0000)]
[RISCV] Silence an unused variable warning in release builds [NFC]

Summary:
Also minor cleanups:
1. Avoided multiple calls to Fixup.getKind()
2. Avoided multiple calls to getFixupKindInfo()
3. Removed a redundant return.

Reviewers: asb, apazos

Reviewed By: asb

Subscribers: rbar, johnrusso, llvm-commits

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

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

6 years ago[X86] Add test case to demonstrate failure to fold the address computation of a simpl...
Craig Topper [Fri, 10 Nov 2017 18:48:18 +0000 (18:48 +0000)]
[X86] Add test case to demonstrate failure to fold the address computation of a simple gather from a global array. NFC

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

6 years ago[Hexagon] Create HexagonISelDAGToDAG.h, NFC
Krzysztof Parzyszek [Fri, 10 Nov 2017 18:39:45 +0000 (18:39 +0000)]
[Hexagon] Create HexagonISelDAGToDAG.h, NFC

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

6 years agoAllow separation of declarations and definitions in <Target>ISelDAGToDAG.inc
Krzysztof Parzyszek [Fri, 10 Nov 2017 18:36:04 +0000 (18:36 +0000)]
Allow separation of declarations and definitions in <Target>ISelDAGToDAG.inc

This patch adds the ability to include the member function declarations
in the instruction selector class separately from the member bodies.

Defining GET_DAGISEL_DECL macro to any value will only include the member
declarations. To include bodies, define GET_DAGISEL_BODY macro to be the
selector class name. Example:

  class FooDAGToDAGISel : public SelectionDAGISel {
    // Pull in declarations only.
    #define GET_DAGISEL_DECL
    #include "FooISelDAGToDAG.inc"
  };

  // Include the function bodies (with names qualified with the provided
  // class name).
  #define GET_DAGISEL_BODY FooDAGToDAGISel
  #include "FooISelDAGToDAG.inc"

When neither of the two macros are defined, the function bodies are emitted
inline (in the same way as before this patch).

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

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

6 years ago[ADT] Rewrite mapped_iterator in terms of iterator_adaptor_base.
Lang Hames [Fri, 10 Nov 2017 17:41:28 +0000 (17:41 +0000)]
[ADT] Rewrite mapped_iterator in terms of iterator_adaptor_base.

Summary:
This eliminates the boilerplate implementation of the iterator interface in
mapped_iterator.

This patch also adds unit tests that verify that the mapped function is applied
by operator* and operator->, and that references returned by the map function
are returned via operator*.

Reviewers: dblaikie, chandlerc

Subscribers: llvm-commits, mgorny

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

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

6 years ago[X86] Add a def file to CPU vendor, type, and subtype encodings used by Host.cpp
Craig Topper [Fri, 10 Nov 2017 17:10:57 +0000 (17:10 +0000)]
[X86] Add a def file to CPU vendor, type, and subtype encodings used by Host.cpp

Summary:
I want to leverage this to clean up some of the code in clang. This will allow us to simplify D39521 which was trying to do some of the same.

If we accurately keep the code in Host.cpp synced with new CPUs added to compile-rt/libgcc we should be able to use this file as a proxy for what's implemented in the libraries.

The entries for the CPUs recognized by the libraries use separate macros that define additional parameters like the name for __builtin_cpu_is and an alias string for the couple cases where __builtin_cpu_is accepts two different names.

All of the macros contain an ARCHNAME that is usually the same as the __builtin_cpu_is string, but sometimes isn't. This represents the name recognized by X86.td and -march.

I'm following the precedent set by ARM and AArch64 and adding this information to lib/Support/TargetParser.cpp

Reviewers: erichkeane, echristo, asbirlea

Reviewed By: echristo

Subscribers: llvm-commits, aemerson, kristof.beyls

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

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

6 years agoLTO: don't fatal when value for cache key already exists
Bob Haarman [Fri, 10 Nov 2017 17:08:21 +0000 (17:08 +0000)]
LTO: don't fatal when value for cache key already exists

Summary:
LTO/Caching.cpp uses file rename to atomically set the value for a
cache key. On Windows, this fails when the destination file already
exists. Previously, LLVM would report_fatal_error in such
cases. However, because the old and the new value for the cache key
are supposed to be equivalent, it actually doesn't matter which one we
keep. This change makes it so that failing the rename when an openable
file with the desired name already exists causes us to report success
instead of fataling.

Reviewers: pcc, hans

Subscribers: mehdi_amini, llvm-commits, hiraditya

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

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

6 years agoMove test into X86 subdirectory.
Adrian Prantl [Fri, 10 Nov 2017 16:36:04 +0000 (16:36 +0000)]
Move test into X86 subdirectory.

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

6 years ago[WebAssembly] Fix stack offsets of return values from call lowering.
Jatin Bhateja [Fri, 10 Nov 2017 16:26:04 +0000 (16:26 +0000)]
[WebAssembly] Fix stack offsets of return values from call lowering.

Summary: Fixes PR35220

Reviewers: vadimcn, alexcrichton

Reviewed By: alexcrichton

Subscribers: pepyakin, alexcrichton, jfb, dschuff, sbc100, jgravelle-google, llvm-commits, aheejin

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

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

6 years ago[AArch64][SVE] Asm: More concise test format
Florian Hahn [Fri, 10 Nov 2017 16:25:16 +0000 (16:25 +0000)]
[AArch64][SVE] Asm: More concise test format

Change the test format for SVE assembler/disassembler tests to be less verbose and have both tests in the same file.

The tests check the following:

 * All instructions are assembled correctly into the right encoding.
 * All instructions are disassembled correctly (into the preferred assembly format)
 * Without -mattr=+sve the instructions are not assembled.
 * Without -mattr=+sve the instructions are not disassembled.

This patch also adds several negative tests for SVE add/sub.

Patch by Sander De Smalen.

Reviewed by: rengolin, fhahn

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

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

6 years ago[X86] Add scheduling tests for DAA/DAS
Simon Pilgrim [Fri, 10 Nov 2017 15:49:41 +0000 (15:49 +0000)]
[X86] Add scheduling tests for DAA/DAS

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

6 years ago[llvm-opt-fuzzer] Add missed library dependence. Fir for rL317883
Igor Laevsky [Fri, 10 Nov 2017 15:08:14 +0000 (15:08 +0000)]
[llvm-opt-fuzzer] Add missed library dependence. Fir for rL317883

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

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

6 years ago[X86] Test non-i64 shld/shll tests on x86_64 targets as well as i686
Simon Pilgrim [Fri, 10 Nov 2017 13:43:04 +0000 (13:43 +0000)]
[X86] Test non-i64 shld/shll tests on x86_64 targets as well as i686

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

6 years ago[llvm-opt-fuzzer] Fix unused variable warning after rL317883
Igor Laevsky [Fri, 10 Nov 2017 13:19:14 +0000 (13:19 +0000)]
[llvm-opt-fuzzer] Fix unused variable warning after rL317883

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

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

6 years ago[X86] Add scheduling tests
Simon Pilgrim [Fri, 10 Nov 2017 12:32:34 +0000 (12:32 +0000)]
[X86] Add scheduling tests
 - CBW etc sign extensions
 - CLC/CLD/CMC flag modifiers
 - CPUID

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

6 years ago[AMDGPU] Prevent Machine Copy Propagation from replacing live copy with the dead one
Alexander Timofeev [Fri, 10 Nov 2017 12:21:10 +0000 (12:21 +0000)]
[AMDGPU] Prevent Machine Copy Propagation from replacing live copy with the dead one

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

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

6 years ago[llvm-opt-fuzzer] Introduce llvm-opt-fuzzer for fuzzing optimization passes
Igor Laevsky [Fri, 10 Nov 2017 12:19:08 +0000 (12:19 +0000)]
[llvm-opt-fuzzer] Introduce llvm-opt-fuzzer for fuzzing optimization passes

This change adds generic fuzzing tools capable of running libFuzzer tests on
any optimization pass or combination of them.

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

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

6 years ago[X86] Added TODO list for missing generic x86 instruction scheduling tests.
Simon Pilgrim [Fri, 10 Nov 2017 12:04:39 +0000 (12:04 +0000)]
[X86] Added TODO list for missing generic x86 instruction scheduling tests.

Not sure if we want to add the more exotic system instructions (IRET etc.) as well?

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

6 years ago[RegisterCoalescer] Move debug value after rematerialize trivial def
Karl-Johan Karlsson [Fri, 10 Nov 2017 09:48:40 +0000 (09:48 +0000)]
[RegisterCoalescer] Move debug value after rematerialize trivial def

Summary:
The associated debug value is updated when the virtual source register
of a copy is completely eliminated and replaced with a rematerialize
value in the defed register of the copy. As the debug value now is
associated with another register it also need to be moved, otherwise
the debug value isn't valid.

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: MatzeB, llvm-commits, qcolombet

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

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

6 years ago[RegAlloc, SystemZ] Increase number of LOCRs by passing "hard" regalloc hints.
Jonas Paulsson [Fri, 10 Nov 2017 08:46:26 +0000 (08:46 +0000)]
[RegAlloc, SystemZ] Increase number of LOCRs by passing "hard" regalloc hints.

* The method getRegAllocationHints() is now of bool type instead of void. If
true is returned, regalloc (AllocationOrder) will *only* try to allocate the
hints, as opposed to merely trying them before non-hinted registers.

* TargetRegisterInfo::getRegAllocationHints() is implemented for SystemZ with
an increase in number of LOCRs.

In this case, it is desired to force the hints even though there is a slight
increase in spilling, because if a non-hinted register would be allocated,
the LOCRMux pseudo would have to be expanded with a jump sequence. The LOCR
(Load On Condition) SystemZ instruction must have both operands in either the
low or high part of the 64 bit register.

Reviewers: Quentin Colombet and Ulrich Weigand
https://reviews.llvm.org/D36795

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

6 years ago[X86] Add support for combining FMADDSUB(A, B, FNEG(C))->FMSUBADD(A, B, C)
Craig Topper [Fri, 10 Nov 2017 08:22:37 +0000 (08:22 +0000)]
[X86] Add support for combining FMADDSUB(A, B, FNEG(C))->FMSUBADD(A, B, C)

Support the opposite direction as well. Also add a TODO for not being able to combine FMSUB/FNMADD/FNMSUB with FNEG.

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

6 years ago[X86] Remove GCCBuiltin from intrinsics that are no longer used by clang.
Craig Topper [Fri, 10 Nov 2017 06:07:37 +0000 (06:07 +0000)]
[X86] Remove GCCBuiltin from intrinsics that are no longer used by clang.

I've also added TODOs for intrinsic removal.

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

6 years ago[AMDGPU] Fix pointer info for lowering load/store for r600 for amdgiz environment
Yaxun Liu [Fri, 10 Nov 2017 02:03:28 +0000 (02:03 +0000)]
[AMDGPU] Fix pointer info for lowering load/store for r600 for amdgiz environment

r600 uses dummy pointer info for lowering load/store. Since dummy pointer info
assumes address space 0, this causes isel failure when temporary load/store SDNodes
are generated for amdgiz environment.

Since the offest is not constant, FixedStack pseudo source value cannot be used
to create the pointer info. This patch creates pointer info using llvm undef value.
At least this provides correct address space so that isel can be done correctly.

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

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

6 years ago[AMDGPU] Fix pointer info for pseudo source for r600
Yaxun Liu [Fri, 10 Nov 2017 01:53:24 +0000 (01:53 +0000)]
[AMDGPU] Fix pointer info for pseudo source for r600

The pointer info for pseudo source for r600 is not correct when
alloca addr space is not 0, which causes invalid SDNode for r600---amdgiz.

This patch fixes that.

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

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

6 years ago[AMDGPU] Update code object description
Tony Tye [Fri, 10 Nov 2017 01:00:54 +0000 (01:00 +0000)]
[AMDGPU] Update code object description

 - Use ELF header flags to identify processor.
 - Remove isa note record.
 - Add target feature section.
 - Make metadata for NumVGPRs, NumSGPRs and MaxFlatWorkGroupSize required.
 - Add FixedWorkGroupSize to CodeProps metadata.
 - Add ReqdWorkGroupSize* to kernel descriptor and move MaxFlatWorkGroupSize to be adjacent.
 - Move IsXNACKEnabled in the kernel descriptor to be at the end of the unused flags.
 - Remove IsDynamicCallStack from the metadata and kernel descriptor.
 - Remove legacy debugger metadata.
 - Remove old XNACK enabled processor names.

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

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

6 years ago[ThinLTO] Fix missing call graph edges for calls with bitcasts.
Volodymyr Sapsai [Fri, 10 Nov 2017 00:47:47 +0000 (00:47 +0000)]
[ThinLTO] Fix missing call graph edges for calls with bitcasts.

This change doesn't fix the root cause of the miscompile PR34966 as the root
cause is in the linker ld64. This change makes call graph more complete
allowing to have better module imports/exports.

rdar://problem/35344706

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: mehdi_amini, inglorion, eraman, llvm-commits, hiraditya

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

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