OSDN Git Service
Matt Arsenault [Wed, 15 Feb 2017 21:50:34 +0000 (21:50 +0000)]
AMDGPU: Replace assert with report_fatal_error
Also use a more refined condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295239
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 15 Feb 2017 21:42:42 +0000 (21:42 +0000)]
[GlobalObject] Fix setSection("")
Summary:
In rL291613, the section name was interned in LLVMContext. However,
this broke the ability to remove the section from a GlobalObject,
because it tried to intern empty strings, which is not allowed.
Fix that and add an appropriate regression test.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D29795
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295238
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Feb 2017 21:31:34 +0000 (21:31 +0000)]
[InstCombine] improve formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295237
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 15 Feb 2017 21:10:09 +0000 (21:10 +0000)]
AssumptionCache: Disable the verifier by default, move it behind a hidden cl::opt and verify from releaseMemory().
This is a short term solution to the problem that many passes currently fail
to update the assumption cache. In the long term the verifier should not
be controllable with a flag. We should either fix all passes to correctly
update the assumption cache and enable the verifier unconditionally or
somehow arrange for the assumption list to be updated automatically by passes.
Differential Revision: https://reviews.llvm.org/D30003
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295236
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 21:09:00 +0000 (21:09 +0000)]
[X86][SSE] Don't call EltsFromConsecutiveLoads if any element is missing.
Minor performance speedup - if any call to getShuffleScalarElt fails to get a result, don't both calling for the remaining elements as EltsFromConsecutiveLoads will fail anyhow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295235
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 15 Feb 2017 20:43:43 +0000 (20:43 +0000)]
AddressSanitizer: don't track swifterror memory addresses
They are register promoted by ISel and so it makes no sense to treat them as
memory.
Inserting calls to the thread sanitizer would also generate invalid IR.
You would hit:
"swifterror value can only be loaded and stored from, or as a swifterror
argument!"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295230
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 15 Feb 2017 20:38:31 +0000 (20:38 +0000)]
[AArch64] Make am_ldrlit an iPTR - not OtherVT - operand. NFC-ish.
am_ldrlit diverged from am_brcond in r207105, but kept the OtherVT
operand type. It made sense for branch targets, as those are
represented as MVT::Other in SDAG. But loads operate on pointers.
This shouldn't have an observable effect on any in-tree code, but helps
make the patterns consistent for external users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295229
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 15 Feb 2017 20:38:28 +0000 (20:38 +0000)]
[OptDiag] Pass const Values/Types to Argument. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295228
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 15 Feb 2017 20:38:22 +0000 (20:38 +0000)]
[IR] Accept 'const Type &' in the Type operator<<. NFC.
Type::print is const; there's no reason for the operator not to be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295227
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Edler von Koch [Wed, 15 Feb 2017 20:36:36 +0000 (20:36 +0000)]
[LTO] Add ability to emit assembly to new LTO API
Summary:
Add a field to LTO::Config, CGFileType, to select the file type to emit (object
or assembly). This is useful for testing and to implement -save-temps.
Reviewers: tejohnson, mehdi_amini, pcc
Reviewed By: mehdi_amini
Subscribers: davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D29475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295226
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 15 Feb 2017 19:49:14 +0000 (19:49 +0000)]
Codegen: Make chains from trellis-shaped CFGs
Lay out trellis-shaped CFGs optimally.
A trellis of the shape below:
A B
|\ /|
| \ / |
| X |
| / \ |
|/ \|
C D
would be laid out A; B->C ; D by the current layout algorithm. Now we identify
trellises and lay them out either A->C; B->D or A->D; B->C. This scales with an
increasing number of predecessors. A trellis is a a group of 2 or more
predecessor blocks that all have the same successors.
because of this we can tail duplicate to extend existing trellises.
As an example consider the following CFG:
B D F H
/ \ / \ / \ / \
A---C---E---G---Ret
Where A,C,E,G are all small (Currently 2 instructions).
The CFG preserving layout is then A,B,C,D,E,F,G,H,Ret.
The current code will copy C into B, E into D and G into F and yield the layout
A,C,B(C),E,D(E),F(G),G,H,ret
define void @straight_test(i32 %tag) {
entry:
br label %test1
test1: ; A
%tagbit1 = and i32 %tag, 1
%tagbit1eq0 = icmp eq i32 %tagbit1, 0
br i1 %tagbit1eq0, label %test2, label %optional1
optional1: ; B
call void @a()
br label %test2
test2: ; C
%tagbit2 = and i32 %tag, 2
%tagbit2eq0 = icmp eq i32 %tagbit2, 0
br i1 %tagbit2eq0, label %test3, label %optional2
optional2: ; D
call void @b()
br label %test3
test3: ; E
%tagbit3 = and i32 %tag, 4
%tagbit3eq0 = icmp eq i32 %tagbit3, 0
br i1 %tagbit3eq0, label %test4, label %optional3
optional3: ; F
call void @c()
br label %test4
test4: ; G
%tagbit4 = and i32 %tag, 8
%tagbit4eq0 = icmp eq i32 %tagbit4, 0
br i1 %tagbit4eq0, label %exit, label %optional4
optional4: ; H
call void @d()
br label %exit
exit:
ret void
}
here is the layout after D27742:
straight_test: # @straight_test
; ... Prologue elided
; BB#0: # %entry ; A (merged with test1)
; ... More prologue elided
mr 30, 3
andi. 3, 30, 1
bc 12, 1, .LBB0_2
; BB#1: # %test2 ; C
rlwinm. 3, 30, 0, 30, 30
beq 0, .LBB0_3
b .LBB0_4
.LBB0_2: # %optional1 ; B (copy of C)
bl a
nop
rlwinm. 3, 30, 0, 30, 30
bne 0, .LBB0_4
.LBB0_3: # %test3 ; E
rlwinm. 3, 30, 0, 29, 29
beq 0, .LBB0_5
b .LBB0_6
.LBB0_4: # %optional2 ; D (copy of E)
bl b
nop
rlwinm. 3, 30, 0, 29, 29
bne 0, .LBB0_6
.LBB0_5: # %test4 ; G
rlwinm. 3, 30, 0, 28, 28
beq 0, .LBB0_8
b .LBB0_7
.LBB0_6: # %optional3 ; F (copy of G)
bl c
nop
rlwinm. 3, 30, 0, 28, 28
beq 0, .LBB0_8
.LBB0_7: # %optional4 ; H
bl d
nop
.LBB0_8: # %exit ; Ret
ld 30, 96(1) # 8-byte Folded Reload
addi 1, 1, 112
ld 0, 16(1)
mtlr 0
blr
The tail-duplication has produced some benefit, but it has also produced a
trellis which is not laid out optimally. With this patch, we improve the layouts
of such trellises, and decrease the cost calculation for tail-duplication
accordingly.
This patch produces the layout A,C,E,G,B,D,F,H,Ret. This layout does have
back edges, which is a negative, but it has a bigger compensating
positive, which is that it handles the case where there are long strings
of skipped blocks much better than the original layout. Both layouts
handle runs of executed blocks equally well. Branch prediction also
improves if there is any correlation between subsequent optional blocks.
Here is the resulting concrete layout:
straight_test: # @straight_test
; BB#0: # %entry ; A (merged with test1)
mr 30, 3
andi. 3, 30, 1
bc 12, 1, .LBB0_4
; BB#1: # %test2 ; C
rlwinm. 3, 30, 0, 30, 30
bne 0, .LBB0_5
.LBB0_2: # %test3 ; E
rlwinm. 3, 30, 0, 29, 29
bne 0, .LBB0_6
.LBB0_3: # %test4 ; G
rlwinm. 3, 30, 0, 28, 28
bne 0, .LBB0_7
b .LBB0_8
.LBB0_4: # %optional1 ; B (Copy of C)
bl a
nop
rlwinm. 3, 30, 0, 30, 30
beq 0, .LBB0_2
.LBB0_5: # %optional2 ; D (Copy of E)
bl b
nop
rlwinm. 3, 30, 0, 29, 29
beq 0, .LBB0_3
.LBB0_6: # %optional3 ; F (Copy of G)
bl c
nop
rlwinm. 3, 30, 0, 28, 28
beq 0, .LBB0_8
.LBB0_7: # %optional4 ; H
bl d
nop
.LBB0_8: # %exit
Differential Revision: https://reviews.llvm.org/D28522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295223
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 15 Feb 2017 19:21:04 +0000 (19:21 +0000)]
include function name in dot filename
Differential Revision: http://reviews.llvm.org/D29975
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295220
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 15 Feb 2017 18:57:06 +0000 (18:57 +0000)]
ThreadSanitizer: don't track swifterror memory addresses
They are register promoted by ISel and so it makes no sense to treat them as
memory.
Inserting calls to the thread sanitizer would also generate invalid IR.
You would hit:
"swifterror value can only be loaded and stored from, or as a swifterror
argument!"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295215
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 15 Feb 2017 18:37:26 +0000 (18:37 +0000)]
[DAG] Don't try to create an INSERT_SUBVECTOR with an illegal source
We currently can't legalize those, but we should really not be creating
them in the first place, since legalization would probably look similar to the
way we legalize CONCAT_VECTORS - basically replace the INSERT with a BUILD.
This fixes PR311956.
Differential Revision: https://reviews.llvm.org/D29961
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295213
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 15 Feb 2017 17:54:39 +0000 (17:54 +0000)]
Expose getBaseDiscriminatorFromDiscriminator, getDuplicationFactorFromDiscriminator and getCopyIdentifierFromDiscriminator API so that downstream tools can use them to get the correct encoding.
Summary: Discriminators are now encoded with rich information. This patch exposes the encoding API to downstream tools.
Reviewers: davidxl, hfinkel
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295210
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Feb 2017 17:42:58 +0000 (17:42 +0000)]
[Inline] add tests to show attribute information loss; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295209
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 17:41:33 +0000 (17:41 +0000)]
[X86][SSE] Propagate undef upper elements from scalar_to_vector during shuffle combining
Only do this for integer types currently - floats types (in particular insertps) load folding often fails with this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295208
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 15 Feb 2017 17:19:50 +0000 (17:19 +0000)]
[AMDGPU] Revert failed scheduling
This patch reverts region's scheduling to the original untouched state
in case if we have have decreased occupancy.
In addition it switches to use TargetRegisterInfo occupancy callback
for pressure limits instead of gradually increasing limits which were
just passed by. We are going to stay with the best schedule so we do
not need to tolerate worsened scheduling anymore.
Differential Revision: https://reviews.llvm.org/D29971
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295206
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 15 Feb 2017 17:08:29 +0000 (17:08 +0000)]
Revert "[JumpThreading] Thread through guards"
This reverts commit r294617.
We fail on an assert while trying to get a condition from an
unconditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295200
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 16:48:45 +0000 (16:48 +0000)]
[X86] Regenerate scalar stack reload test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295195
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Wed, 15 Feb 2017 16:03:22 +0000 (16:03 +0000)]
Fix unittest for buildbot with mips host (32bit big endian) from r295174
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295188
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Feb 2017 15:22:18 +0000 (15:22 +0000)]
[InlineFunction] use getFunction(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295185
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 15:11:36 +0000 (15:11 +0000)]
Fix spelling mistake - paramater -> parameter. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295182
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Feb 2017 15:08:38 +0000 (15:08 +0000)]
[InlineFunction] use getCaller(); NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295181
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Feb 2017 14:56:11 +0000 (14:56 +0000)]
[InlineFunction] use range-for loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295179
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 14:06:17 +0000 (14:06 +0000)]
[X86] Regenerate i64 ext-load on 32-bit target tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295177
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Wed, 15 Feb 2017 13:40:05 +0000 (13:40 +0000)]
Attempt to fix buildbots after commit of r295173.
Unit tests needed to check on the endianness of the host platform. (Test was failing for big endian hosts).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295174
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Wed, 15 Feb 2017 12:58:41 +0000 (12:58 +0000)]
Fix incorrect formatting of DataRefImpl members in operator<< function
Changed format specifiers to use format macro constant for pointer type.
Moved width part of format specifier in the correct place for formatting members a and b.
Added a unit test to confirm the output.
Differential Revision: https://reviews.llvm.org/D28957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295173
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Feb 2017 11:46:15 +0000 (11:46 +0000)]
[X86][SSE] Allow matchVectorShuffleWithUNPCK to recognise ZERO inputs
Add support for specifying an UNPCK input as ZERO, particularly improves ZEXT cases with non-zero offsets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295169
91177308-0d34-0410-b5e6-
96231b3b80d8
Sagar Thakur [Wed, 15 Feb 2017 10:48:11 +0000 (10:48 +0000)]
[LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el
Summary: Adds support for xray instrumentation on mips for both 32-bit and 64-bit.
Reviewed by sdardis, dberris
Differential: D27697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295164
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 15 Feb 2017 09:56:08 +0000 (09:56 +0000)]
Revert r295110 and r295144.
This fails under ASAN:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/798/steps/check-llvm%20asan/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295162
91177308-0d34-0410-b5e6-
96231b3b80d8
Ayman Musa [Wed, 15 Feb 2017 08:12:16 +0000 (08:12 +0000)]
[X86][AVX] Remove REX_W from AVX instructions.
There is no meaning for REX_W in VEX encoded AVX instruction.
Differential Revision: https://reviews.llvm.org/D29894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295157
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Feb 2017 06:58:47 +0000 (06:58 +0000)]
[X86] Don't create VBROADCAST nodes with 256-bit or 512-bit input types
Summary:
We don't seem to have great rules on what a valid VBROADCAST node looks like. And as a consequence we end up with a lot of patterns to try to catch everything. We have patterns with scalar inputs, 128-bit vector inputs, 256-bit vector inputs, and 512-bit vector inputs.
As you can see from the things improved here we are currently missing patterns for 128-bit loads being extended to 256-bit before the vbroadcast.
I'd like to propose that VBROADCAST should always take a 128-bit vector type as input. As a first step towards that this patch adds an EXTRACT_SUBVECTOR in front of VBROADCAST when the input is 256 or 512-bits. In the future I would like to add scalar_to_vector around all the scalar operations. And maybe we should consider adding a VBROADCAST+load node to avoid separating loads from the broadcasting operation when the load itself isn't foldable.
This requires an additional change in target shuffle combining to look for the extract subvector and look through it to find the original operand. I'm sure this change isn't perfect but was enough to fix a few test failures that were being caused.
Another interesting thing I noticed is that the changes in masked_gather_scatter.ll show cases were we don't remove a useless insert into element 1 before broadcasting element 0.
Reviewers: delena, RKSimon, zvi
Reviewed By: zvi
Subscribers: igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D28747
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295155
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Feb 2017 06:51:39 +0000 (06:51 +0000)]
[AVX-512] Add PACKSS/PACKUS instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295154
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Feb 2017 05:57:16 +0000 (05:57 +0000)]
[SelectionDAGBuilder] Simplify creation of shufflevector DAG nodes where inputs are larger than the mask
Summary:
The current code loops over all elements to calculate a used range. Then a second short loop looks at the ranges and determines if they can be used in a extract and creates a properly aligned start index for the extract.
This range finding is unnecessary, we can just calculate a properly aligned start index for an extract for each input during the first loop. If we don't find the same start index for each indice we can't use an extract.
Reviewers: zvi, RKSimon
Reviewed By: zvi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29926
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295152
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 15 Feb 2017 05:39:35 +0000 (05:39 +0000)]
[Orc][RPC] Add a AsyncHandlerTraits specialization for non-value-type response
handler args.
The specialization just inherits from the std::decay'd response handler type.
This allows member functions (via MemberFunctionWrapper) to be used as async
handlers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295151
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 15 Feb 2017 03:50:01 +0000 (03:50 +0000)]
AssumptionCache: Update documentation comment.
The comment was somewhat misleading in that it implied that passes were not
responsible for adding new assumptions to the assumption cache. This new
wording now explicitly mentions that they are required to do so.
Differential Revision: https://reviews.llvm.org/D29977
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295148
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 15 Feb 2017 03:01:11 +0000 (03:01 +0000)]
SimplifyCFG: Register cloned assume intrinsics with assumption cache when creating critical edge.
Differential Revision: https://reviews.llvm.org/D29976
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295145
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 15 Feb 2017 02:13:08 +0000 (02:13 +0000)]
WholeProgramDevirt: Separate the code that applies optzns from the code that decides whether to apply them. NFCI.
The idea is that the apply* functions will also be called when importing
devirt optimizations.
Differential Revision: https://reviews.llvm.org/D29745
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295144
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 01:48:33 +0000 (01:48 +0000)]
Revert r295138: Instead of a series of string operations, use snprintf().
This broke buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295142
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 01:09:40 +0000 (01:09 +0000)]
Instead of a series of string operations, use snprintf().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295138
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 01:09:20 +0000 (01:09 +0000)]
Return early. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295137
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 01:09:01 +0000 (01:09 +0000)]
Use LLVM-style naming scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295136
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 15 Feb 2017 01:03:59 +0000 (01:03 +0000)]
[AMDGPU] Fix MaxWorkGroupsPerCU for large workgroups
This patch corrects the maximum workgroups per CU if we have big
workgroups (more than 128). This calculation contributes to the
occupancy calculation in respect to LDS size.
Differential Revision: https://reviews.llvm.org/D29974
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295134
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 00:28:48 +0000 (00:28 +0000)]
Use LLVM-style naming scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295132
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 00:28:26 +0000 (00:28 +0000)]
Remove useless local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295131
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Feb 2017 00:15:54 +0000 (00:15 +0000)]
Split WinCOFFObjectWriter::defineSection. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295128
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 14 Feb 2017 23:58:19 +0000 (23:58 +0000)]
Simplify WinCOFFObjectWriter by removing a template member function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295126
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 14 Feb 2017 23:47:34 +0000 (23:47 +0000)]
Do not lookup a DenseMap twice using the same key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295124
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 14 Feb 2017 23:28:19 +0000 (23:28 +0000)]
Use endian::write32le instead of endian::write.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295120
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 14 Feb 2017 23:28:01 +0000 (23:28 +0000)]
Use zero-initialization instead of memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295119
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 14 Feb 2017 23:02:37 +0000 (23:02 +0000)]
[libFuzzer] increase the size of FixedWord from 27 to 64, see PR31950
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295117
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Tue, 14 Feb 2017 22:49:49 +0000 (22:49 +0000)]
Disable wrapping llvm-xray YAML output
Summary:
The YAML output produced by llvm-xray is supposed to be wrapped at the
arbitrary default of 70 columns set by `yaml:Output`. Unfortunately,
the wrapping is rather unpredictable, and can easily go past the set
number of columns, depending on the execution environment.
To make the YAML output environment-independent, disable wrapping
instead.
Reviewers: dberris
Reviewed By: dberris
Subscribers: fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D29962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295116
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Tue, 14 Feb 2017 22:49:28 +0000 (22:49 +0000)]
Fix a bug in caller's BFI update code after inlining.
Multiple blocks in the callee can be mapped to a single cloned block
since we prune the callee as we clone it. The existing code
iterates over the value map and clones the block frequency (and
eventually scales the frequencies of the cloned blocks). Value map's
iteration is not deterministic and so the cloned block might get the
frequency of any of the original blocks. The fix is to set the max of
the original frequencies to the cloned block. The first block in the
sequence must have this max frequency and, in the call context,
subsequent blocks must have its frequency.
Differential Revision: https://reviews.llvm.org/D29696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295115
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 14 Feb 2017 22:14:36 +0000 (22:14 +0000)]
Use "%zd" format specifier for printing number of testcases executed.
Summary:
This helps to avoid signed integer overflow after running a fast fuzz target for several hours, e.g.:
<...>
Done -
1097903291 runs in 54001 second(s)
Reviewers: kcc
Reviewed By: kcc
Differential Revision: https://reviews.llvm.org/D29941
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295112
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 14 Feb 2017 22:14:01 +0000 (22:14 +0000)]
[LV] Rename Induction to PrimaryInduction. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295111
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 14 Feb 2017 22:12:23 +0000 (22:12 +0000)]
WholeProgramDevirt: Change internal vcall data structures to match summary.
Group calls into constant and non-constant arguments up front, and use uint64_t
instead of ConstantInt to represent constant arguments. The goal is to allow
the information from the summary to fit naturally into this data structure in
a future change (specifically, it will be added to CallSiteInfo).
This has two side effects:
- We disallow VCP for constant integer arguments of width >64 bits.
- We remove the restriction that the bitwidth of a vcall's argument and return
types must match those of the vfunc definitions.
I don't expect either of these to matter in practice. The first case is
uncommon, and the second one will lead to UB (so we can do anything we like).
Differential Revision: https://reviews.llvm.org/D29744
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295110
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 14 Feb 2017 21:53:23 +0000 (21:53 +0000)]
[mips] Correct mips16 return instructions definitions
Correct the definition of MIPS16 instructions that act as return instructions
so that isReturn = 1 as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295109
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Tue, 14 Feb 2017 21:10:40 +0000 (21:10 +0000)]
[BasicBlockUtils] Use getFirstNonPHIOrDbg to set debugloc for instructions created in SplitBlockPredecessors
Summary:
When setting debugloc for instructions created in SplitBlockPredecessors, current implementation copies debugloc from the first-non-phi instruction of the original basic block. However, if the first-non-phi instruction is a call for @llvm.dbg.value, the debugloc of the instruction may point the location outside of the block itself. For the example code of
```
1 typedef struct _node_t {
2 struct _node_t *next;
3 } node_t;
4
5 extern node_t *root;
6
7 int foo() {
8 node_t *node, *tmp;
9 int ret = 0;
10
11 node = tmp = root->next;
12 while (node != root) {
13 while (node) {
14 tmp = node;
15 node = node->next;
16 ret++;
17 }
18 }
19
20 return ret;
21 }
```
, below is the basicblock corresponding to line 12 after Reassociate expressions pass:
```
while.cond: ; preds = %while.cond2, %entry
%node.0 = phi %struct._node_t* [ %1, %entry ], [ null, %while.cond2 ]
%ret.0 = phi i32 [ 0, %entry ], [ %ret.1, %while.cond2 ]
tail call void @llvm.dbg.value(metadata i32 %ret.0, i64 0, metadata !19, metadata !20), !dbg !21
tail call void @llvm.dbg.value(metadata %struct._node_t* %node.0, i64 0, metadata !11, metadata !20), !dbg !31
%cmp = icmp eq %struct._node_t* %node.0, %0, !dbg !33
br i1 %cmp, label %while.end5, label %while.cond2, !dbg !35
```
As you can see, the first-non-phi instruction is a call for @llvm.dbg.value, and the debugloc is
```
!21 = !DILocation(line: 9, column: 7, scope: !6)
```
, which is a definition of 'ret' variable and outside of the scope of the basicblock itself. However, current implementation picks up this debugloc for the instructions created in SplitBlockPredecessors. This patch addresses this problem by picking up debugloc from the first-non-phi-non-dbg instruction.
Reviewers: dblaikie, samsonov, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29867
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295106
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 14 Feb 2017 21:02:24 +0000 (21:02 +0000)]
[BranchFolding] Tail common all identical unreachable blocks
Summary:
Blocks ending in unreachable are typically cold because they end the
program or throw an exception, so merging them with other identical
blocks is usually profitable because it reduces the size of cold code.
MachineBlockPlacement generally does not arrange to fall through to such
blocks, so commoning these blocks will not introduce additional
unconditional branches.
Reviewers: hans, iteratee, haicheng
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295105
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 14 Feb 2017 20:56:29 +0000 (20:56 +0000)]
GlobalISel: deal with new G_PTR_MASK instruction on AArch64.
It's just an AND-immediate instruction for us, surprisingly simple to select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295104
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 14 Feb 2017 20:56:18 +0000 (20:56 +0000)]
GlobalISel: introduce G_PTR_MASK to simplify alloca handling.
This instruction clears the low bits of a pointer without requiring (possibly
dodgy if pointers aren't ints) conversions to and from an integer. Since (as
far as I'm aware) all masks are statically known, the instruction takes an
immediate operand rather than a register to specify the mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295103
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 14 Feb 2017 20:03:48 +0000 (20:03 +0000)]
Re-apply "[profiling] Remove dead profile name vars after emitting name data"
This reverts 295092 (re-applies 295084), with a fix for dangling
references from the array of coverage names passed down from frontends.
I missed this in my initial testing because I only checked test/Profile,
and not test/CoverageMapping as well.
Original commit message:
The profile name variables passed to counter increment intrinsics are dead
after we emit the finalized name data in __llvm_prf_nm. However, we neglect to
erase these name variables. This causes huge size increases in the
__TEXT,__const section as well as slowdowns when linker dead stripping is
disabled. Some affected projects are so massive that they fail to link on
Darwin, because only the small code model is supported.
Fix the issue by throwing away the name constants as soon as we're done with
them.
Differential Revision: https://reviews.llvm.org/D29921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295099
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 14 Feb 2017 19:43:50 +0000 (19:43 +0000)]
Reformat slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295096
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Tue, 14 Feb 2017 19:08:45 +0000 (19:08 +0000)]
Reapply r294532, reverted in r294787.
Store instructions can have more than one memory operand as a result
of optimizations that fold different stores into one.
When we identify spill instructions to generate DBG_VALUE instructions
to record the spilling of a variable, we disregard stores with
multiple memory operands for now. We may miss some relevant spills but
the handling is a bit more complex, so we'll do it in a different patch.
This fixes PR31935.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295093
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 14 Feb 2017 19:08:39 +0000 (19:08 +0000)]
Revert "[profiling] Remove dead profile name vars after emitting name data"
This reverts commit r295084. There is a test failure on:
http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/2620/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295092
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 14 Feb 2017 19:06:43 +0000 (19:06 +0000)]
allow migrating away from cmake option for LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
In r288754, Mehdi added a cmake option to disable enforcement of the ABI
breaking checks in the "abi-breaking.h" header. We used that when building
Swift and it works, but I think it will be better to control this with a
preprocessor macro instead of a cmake option. That will let us opt out of
the enforcement more selectively.
This change allows skipping the cmake setting if the existing preprocessor
macro is already defined. My intention here is to make this change and get
Swift to use it, and then after a few weeks, we can remove the cmake option.
I want to stage it like that to be less disruptive. I'm not aware of anyone
else using that cmake option.
Mehdi had some initial concern about the impact of using a preprocessor
macro when building with modules enabled. I don't think that will be a
problem if we set the macro on the command line with a -D option in those
contexts where we need to disable the enforcement of the checks.
https://reviews.llvm.org/D29919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295090
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 14 Feb 2017 19:06:37 +0000 (19:06 +0000)]
[Support] Add StringRef::getAsDouble.
Differential Revision: https://reviews.llvm.org/D29918
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295089
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 14 Feb 2017 18:48:48 +0000 (18:48 +0000)]
[profiling] Remove dead profile name vars after emitting name data
The profile name variables passed to counter increment intrinsics are
dead after we emit the finalized name data in __llvm_prf_nm. However, we
neglect to erase these name variables. This causes huge size increases
in the __TEXT,__const section as well as slowdowns when linker dead
stripping is disabled. Some affected projects are so massive that they
fail to link on Darwin, because only the small code model is supported.
Fix the issue by throwing away the name constants as soon as we're done
with them.
Differential Revision: https://reviews.llvm.org/D29921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295084
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Tue, 14 Feb 2017 18:32:41 +0000 (18:32 +0000)]
[Tablegen] Instrumenting table gen DAGGenISelDAG
To help assist in debugging ISEL or to prioritize GlobalISel backend
work, this patch adds two more tables to <Target>GenISelDAGISel.inc -
one which contains the patterns that are used during selection and the
other containing include source location of the patterns
Enabled through CMake varialbe LLVM_ENABLE_DAGISEL_COV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295081
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 14 Feb 2017 18:18:58 +0000 (18:18 +0000)]
[opt-viewer] For single-process, fall back on map instead of Pool.map
This allows for nicer backtrace and debugging when -j1 is passed:
$ opt-viewer.py CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml html
Traceback (most recent call last):
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
generate_report(pmap, all_remarks, file_remarks, args.source_dir, args.output_dir)
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in generate_report
pmap(_render_file_bound, file_remarks.items())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
Exception: blah
$ opt-viewer.py -j 1 CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml html
Traceback (most recent call last):
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
generate_report(pmap, all_remarks, file_remarks, args.source_dir, args.output_dir)
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in generate_report
pmap(_render_file_bound, file_remarks.items())
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 317, in _render_file
SourceFileRenderer(source_dir, output_dir, filename).render(remarks)
File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 168, in __init__
raise Exception("blah")
Exception: blah
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295080
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 14 Feb 2017 17:37:44 +0000 (17:37 +0000)]
[Hexagon] Remove leftover debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295078
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Tue, 14 Feb 2017 17:30:05 +0000 (17:30 +0000)]
Do not apply redundant LastCallToStaticBonus
Summary:
As written in the comments above, LastCallToStaticBonus is already applied to
the cost if Caller has only one user, so it is redundant to reapply the bonus
here.
If the only user is not a caller, TotalSecondaryCost will not be adjusted
anyway because callerWillBeRemoved is false. If there's no caller at all, we
don't need to care about TotalSecondaryCost because
inliningPreventsSomeOuterInline is false.
Reviewers: chandlerc, eraman
Reviewed By: eraman
Subscribers: haicheng, davidxl, davide, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D29169
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295075
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 14 Feb 2017 17:21:12 +0000 (17:21 +0000)]
[LazyBFI] Fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295073
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 14 Feb 2017 17:21:09 +0000 (17:21 +0000)]
Add new pass LazyMachineBlockFrequencyInfo
And use it in MachineOptimizationRemarkEmitter. A test will follow on top of
Justin's changes to enable MachineORE in AsmPrinter.
The approach is similar to the IR-level pass. It's a bit simpler because BPI
is immutable at the Machine level so we don't need to make that lazy.
Because of this, a new function mapping is introduced (BPIPassTrait::getBPI).
This function extracts BPI from the pass. In case of the lazy pass, this is
when the calculation of the BFI occurs. For Machine-level, this is the
identity function.
Differential Revision: https://reviews.llvm.org/D29836
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295072
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 14 Feb 2017 17:21:04 +0000 (17:21 +0000)]
[LazyBFI] Split out and templatize LazyBlockFrequencyInfo, NFC
This will be used by the LazyMachineBFI pass.
Differential Revision: https://reviews.llvm.org/D29834
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295071
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 14 Feb 2017 16:43:49 +0000 (16:43 +0000)]
fix documentation comments for Argument; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295068
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Cain [Tue, 14 Feb 2017 16:41:10 +0000 (16:41 +0000)]
Correct a typo, s/hosting/hoisting/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295066
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 14 Feb 2017 16:39:54 +0000 (16:39 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295065
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Tue, 14 Feb 2017 16:35:56 +0000 (16:35 +0000)]
[Support] Add formatv support for StringLiteral
Summary:
This is achieved by generalizing the expression selecting the StringRef
format_provider. Now, anything that can be converted to a StringRef will
use it's formatter.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29898
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295064
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Tue, 14 Feb 2017 16:28:32 +0000 (16:28 +0000)]
Reapply "[LV] Extend trunc optimization to all IVs with constant integer steps"
This reapplies commit r294967 with a fix for the execution time regressions
caught by the clang-cmake-aarch64-quick bot. We now extend the truncate
optimization to non-primary induction variables only if the truncate isn't
already free.
Differential Revision: https://reviews.llvm.org/D29847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295063
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 16:22:04 +0000 (16:22 +0000)]
[X86][SSE] Allow matchVectorShuffleWithUNPCK to recognise UNDEF inputs
Add support for specifying an UNPCK input as UNDEF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295061
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Tue, 14 Feb 2017 15:53:12 +0000 (15:53 +0000)]
[SCEV] Cache results during GetMinTrailingZeros query
Differential Revision: https://reviews.llvm.org/D29759
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295060
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 15:49:37 +0000 (15:49 +0000)]
[X86][SSE] Add shuffle combine tests showing missed opportunities to use UNPCK
Not correctly using UNDEF or ZERO inputs to combine to UNPCK shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295059
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 15:29:50 +0000 (15:29 +0000)]
[X86][SSE] Regenerate intrinsic upgrade tests
Remove excess semicolons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295058
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 14 Feb 2017 15:20:48 +0000 (15:20 +0000)]
[SLP] Fix for PR31879: vectorize repeated scalar ops that don't get put
back into a vector
Previously the cost of the existing ExtractElement/ExtractValue
instructions was considered as a dead cost only if it was detected that
they have only one use. But these instructions may be considered
dead also if users of the instructions are also going to be vectorized,
like:
```
%x0 = extractelement <2 x float> %x, i32 0
%x1 = extractelement <2 x float> %x, i32 1
%x0x0 = fmul float %x0, %x0
%x1x1 = fmul float %x1, %x1
%add = fadd float %x0x0, %x1x1
```
This can be transformed to
```
%1 = fmul <2 x float> %x, %x
%2 = extractelement <2 x float> %1, i32 0
%3 = extractelement <2 x float> %1, i32 1
%add = fadd float %2, %3
```
because though `%x0` and `%x1` have 2 users each other, these users are
part of the vectorized tree and we can consider these `extractelement`
instructions as dead.
Differential Revision: https://reviews.llvm.org/D29900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295056
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Tue, 14 Feb 2017 14:44:01 +0000 (14:44 +0000)]
Removing a redundant assignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295055
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Timofeev [Tue, 14 Feb 2017 14:29:05 +0000 (14:29 +0000)]
Revert "[AMDGPU] Fix for SIMachineScheduler crash. SI Scheduler should track"
This reverts commit
ce06d9cb99298eb844b66e117f5108a06747c907.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295054
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 13:47:17 +0000 (13:47 +0000)]
[X86][SSE] Move unary inputs handling inside matchVectorShuffleWithUNPCK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295053
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 12:54:39 +0000 (12:54 +0000)]
[X86][SSE] Tidyup matchVectorShuffleWithUNPCK helper function call.
Don't bother setting the V1/V2 operands again for unary shuffles.
Don't bother legalizing the value type unless the match succeeds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295051
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 14 Feb 2017 12:52:05 +0000 (12:52 +0000)]
[SLP] Additional tests for extractelement cost fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295050
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 14 Feb 2017 11:20:11 +0000 (11:20 +0000)]
[X86][SSE] Test case showing missed PSHUFB target shuffle constant fold opportunity.
It also shows an unnecessary pshufb/broadcast being used - the original pshufb mask only requested the lowest byte.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295046
91177308-0d34-0410-b5e6-
96231b3b80d8
Karl-Johan Karlsson [Tue, 14 Feb 2017 10:06:16 +0000 (10:06 +0000)]
Revert "[LoopVectorize] Added address space check when analysing interleaved accesses"
This reverts r295038. The buildbot clang-with-thin-lto-ubuntu failed.
I'm reverting to investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295042
91177308-0d34-0410-b5e6-
96231b3b80d8
Karl-Johan Karlsson [Tue, 14 Feb 2017 08:14:06 +0000 (08:14 +0000)]
[LoopVectorize] Added address space check when analysing interleaved accesses
Prevent memory objects of different address spaces to be part of
the same load/store groups when analysing interleaved accesses.
This is fixing pr31900.
Reviewers: HaoLiu, mssimpso, mkuper
Reviewed By: mssimpso, mkuper
Subscribers: llvm-commits, efriedma, mzolotukhin
Differential Revision: https://reviews.llvm.org/D29717
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295038
91177308-0d34-0410-b5e6-
96231b3b80d8
Karl-Johan Karlsson [Tue, 14 Feb 2017 07:31:36 +0000 (07:31 +0000)]
Test commit permission
Removing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295037
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 14 Feb 2017 07:10:03 +0000 (07:10 +0000)]
Add initializer that was missed in r295009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295036
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 14 Feb 2017 06:54:57 +0000 (06:54 +0000)]
[AVX-512] Add PAVGB/PAVGW to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295035
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Tue, 14 Feb 2017 06:37:42 +0000 (06:37 +0000)]
[LSR] Pointers with different address spaces are considered incompatible.
Summary:
Function isCompatibleIVType is already used as a guard before the call to
SE.getMinusSCEV(OperExpr, PrevExpr);
in LSRInstance::ChainInstruction. getMinusSCEV requires the expressions
to be of the same type, so we now consider two pointers with different
address spaces to be incompatible, since it is possible that the pointers
in fact have different sizes.
Reviewers: qcolombet, eli.friedman
Reviewed By: qcolombet
Subscribers: nhaehnle, Ka-Ka, llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D29885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295033
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 14 Feb 2017 05:40:01 +0000 (05:40 +0000)]
[Orc][RPC] Remove lanch policies in favor of async handlers.
Launch policies provided a mechanism for running RPC handlers on a background
thread (unblocking the main RPC receiver thread). Async handlers generalize
this by passing the responder function (the function that sends the RPC return
value) as an argument to the handler. The handler can optionally do its work on
a background thread (the same way launch policies do), but can also (a) can
inspect the call arguments before deciding to run the work on a different
thread, or (b) can use the responder in a subsequent RPC call (e.g. in the
handler of a callAsync), allowing the handler to call back to the originator (or
to a 3rd party) without blocking the listener thread, and without launching a
new thread.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295030
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Tue, 14 Feb 2017 05:20:20 +0000 (05:20 +0000)]
[RISCV] Fix RV32 datalayout string and ensure initAsmInfo is called
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295028
91177308-0d34-0410-b5e6-
96231b3b80d8