OSDN Git Service
Pete Cooper [Tue, 23 Aug 2016 16:23:45 +0000 (16:23 +0000)]
Fix some more asserts after r279466.
That commit added a new version of Intrinsic::getName which should only
be called when the intrinsic has no overloaded types. There are several
debugging paths, such as SDNode::dump which are printing the name of the
intrinsic but don't have the overloaded types. These paths should be ok
to just print the name instead of crashing.
The fix here is ultimately to just add a 'None' second argument as that
calls the overload capable getName, which is less efficient, but this is a
debugging path anyway, and not perf critical.
Thanks to Björn Pettersson for pointing out that there were more crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279528
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 16:11:21 +0000 (16:11 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279527
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 23 Aug 2016 16:01:01 +0000 (16:01 +0000)]
[Hexagon] Packetize return value setup with the return instruction
Commit r279241 unintentionally reverted that ability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279526
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 23 Aug 2016 16:00:54 +0000 (16:00 +0000)]
Fix windows build failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279525
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 23 Aug 2016 15:56:50 +0000 (15:56 +0000)]
Rename unittests/ADT/ilistTest.cpp to ilistTestTemp.cpp (temporarily)
I'll rename this to IListTest.cpp after a waiting period (tonight?
tomorrow?), with a full explanation in that commit.
First, I'm moving it aside because Git doesn't play well with case-only
filename changes on case-insensitive file systems (and I suspect the
same is true of SVN). This two-stage change should help to avoid
spurious failures on bots that don't do clean checkouts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279524
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 23 Aug 2016 15:39:03 +0000 (15:39 +0000)]
[Profile] refactor meta data copying/swapping code
Differential Revision: http://reviews.llvm.org/D23619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279523
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 23 Aug 2016 15:38:59 +0000 (15:38 +0000)]
Work around PR29097 to get the module bots going again.
This replaces an =default constructor with an explicit definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279522
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 15:10:39 +0000 (15:10 +0000)]
[X86][AVX] Updated fptosi_2f64_to_4i32 test to show missed opportunity to implicit zero the upper elements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279521
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 15:00:52 +0000 (15:00 +0000)]
[X86][AVX] Add v2i32 fp to int conversion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279520
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 14:37:35 +0000 (14:37 +0000)]
[X86][AVX] Add AVX2/AVX512 fp to int conversion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 23 Aug 2016 14:36:53 +0000 (14:36 +0000)]
[lanai] Use const instead of constexpr
The windows build bot did not like constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279517
91177308-0d34-0410-b5e6-
96231b3b80d8
Elliot Colp [Tue, 23 Aug 2016 14:03:02 +0000 (14:03 +0000)]
Fix SystemZ hang caused by r279105
The change in r279105 causes an infinite loop in some cases, as it sets the upper bits of an AND mask constant, which DAGCombiner::SimplifyDemandedBits then unsets.
This patch reverts that part of the behaviour, instead relying on .td peepholes to perform the transformation to NILL. I reapplied my original fix for the problem addressed by r279105 (unsetting the upper bits, which prevents a compiler abort for a different reason).
Differential Revision: https://reviews.llvm.org/D23781
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279515
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 23 Aug 2016 12:32:57 +0000 (12:32 +0000)]
[LTOCodeGenerator] Reduce code duplication. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279514
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 11:26:28 +0000 (11:26 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2ps intrinsics implicitly zeroes the upper half of the xmm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279511
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 23 Aug 2016 10:47:40 +0000 (10:47 +0000)]
LLVMLanaDesc: Update libdesp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279510
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 23 Aug 2016 10:43:01 +0000 (10:43 +0000)]
Change the target's name, s/LanaiMCTargetDesc/LanaiDesc/g.
"AllTargetsDescs" in llvm-mc/CMakeLists.txt expects not ${target}MCTargetDesc, but ${target}Desc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279509
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 23 Aug 2016 10:35:24 +0000 (10:35 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2ps implicitly zeroes the upper half of the xmm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279508
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 23 Aug 2016 09:19:22 +0000 (09:19 +0000)]
[ARM] Generate consistent frame records for Thumb2
There is not an official documented ABI for frame pointers in Thumb2,
but we should try to emit something which is useful.
We use r7 as the frame pointer for Thumb code, which currently means
that if a function needs to save a high register (r8-r11), it will get
pushed to the stack between the frame pointer (r7) and link register
(r14). This means that while a stack unwinder can follow the chain of
frame pointers up the stack, it cannot know the offset to lr, so does
not know which functions correspond to the stack frames.
To fix this, we need to push the callee-saved registers in two batches,
with the first push saving the low registers, fp and lr, and the second
push saving the high registers. This is already implemented, but
previously only used for iOS. This patch turns it on for all Thumb2
targets when frame pointers are required by the ABI, and the frame
pointer is r7 (Windows uses r11, so this isn't a problem there). If
frame pointer elimination is enabled we still emit a single push/pop
even if we need a frame pointer for other reasons, to avoid increasing
code size.
We must also ensure that lr is pushed to the stack when using a frame
pointer, so that we end up with a complete frame record. Situations that
could cause this were rare, because we already push lr in most
situations so that we can return using the pop instruction.
Differential Revision: https://reviews.llvm.org/D23516
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279506
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Tue, 23 Aug 2016 05:42:41 +0000 (05:42 +0000)]
GVNHoist: Use the pass version of MemorySSA and preserve it.
Summary: GVNHoist: Use the pass version of MemorySSA and preserve it.
Reviewers: sebpop, george.burgess.iv
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23782
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279504
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 23 Aug 2016 05:17:11 +0000 (05:17 +0000)]
Revert "(HEAD -> master, origin/master, origin/HEAD) CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses"
Reverting while tracking down a use after free.
This reverts commit r279502.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279503
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 23 Aug 2016 03:20:09 +0000 (03:20 +0000)]
CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.
This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.
Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.
Differential Revision: http://reviews.llvm.org/D23736
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279502
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 23 Aug 2016 01:30:30 +0000 (01:30 +0000)]
BranchRelaxation: Fix handling of blocks with multiple conditional
branches
Looping over all terminators exposed AArch64 tests hitting
an assert from analyzeBranch failing. I believe these cases
were miscompiled before.
e.g.
fcmp s0, s1
b.ne LBB0_1
b.vc LBB0_2
b LBB0_2
LBB0_1:
; Large block
LBB0_2:
; ...
Both of the individual conditional branches need to
be expanded, since neither can reach the final block.
Split the original block into ones which analyzeBranch
will be able to understand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279499
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 23 Aug 2016 01:06:44 +0000 (01:06 +0000)]
[lanai] Make Lanai backend non-experimental
Summary:
Add Lanai backend to default targets.
Discussion of proposal: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102480.html. ISA added in r279149.
Reviewers: jyknight, rengolin, eliben, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22530
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279498
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 23 Aug 2016 01:04:41 +0000 (01:04 +0000)]
[lanai] Exit early in Mem Alu combiner if sentinel reach.
LanaiMemAluCombiner could try to query the debug value of a list sentinel. Add check to exit early instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279497
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Mon, 22 Aug 2016 23:40:01 +0000 (23:40 +0000)]
[MemorySSA] Remove unused field. NFC.
Given that we're not currently using blocker info, and whether or not we
will end up using it it is unclear, don't waste 8 (or 4) bytes of memory
per path node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279493
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Aug 2016 23:12:02 +0000 (23:12 +0000)]
[InstSimplify] add helper function for SimplifyICmpInst(); NFCI
And add a FIXME because the helper excludes folds for vectors. It's
not clear yet how many of these are actually testable (and therefore
necessary?) because later analysis uses computeKnownBits and other
methods to catch many of these cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279492
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 22 Aug 2016 22:27:05 +0000 (22:27 +0000)]
Fix crash from assert in r279466.
The assert in r279466 checks that we call the correct version of
Intrinsic::getName. The version which accepts only an ID should not
be used for intrinsics with overloaded types. The global-isel
code was calling the wrong version. The test CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
will ensure that we call the correct version from now on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279487
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 22 Aug 2016 22:21:07 +0000 (22:21 +0000)]
ADT: Separate some list manipulation API into ilist_base, NFC
Separate algorithms in iplist<T> that don't depend on T into ilist_base,
and unit test them.
While I was adding unit tests for these algorithms anyway, I also added
unit tests for ilist_node_base and ilist_sentinel<T>.
To make the algorithms and unit tests easier to write, I also did the
following minor changes as a drive-by:
- encapsulate Prev/Next in ilist_node_base to so that algorithms are
easier to read, and
- update ilist_node_access API to take nodes by reference.
There should be no real functionality change here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279484
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 22 Aug 2016 22:04:16 +0000 (22:04 +0000)]
Fix header comment for unittests/ADT/ilistTest.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279483
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Mon, 22 Aug 2016 21:59:26 +0000 (21:59 +0000)]
[ADT] Actually mutate the iterator VisitStack.back().second, not its copy.
Summary: Before the change, *Opt never actually gets updated by the end
of toNext(), so for every next time the loop has to start over from
child_begin(). This bug doesn't affect the correctness, since Visited prevents
it from re-entering the same node again; but it's slow.
Reviewers: dberris, dblaikie, dannyb
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23649
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279482
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Aug 2016 21:24:29 +0000 (21:24 +0000)]
[InstCombine] change param type from Instruction to BinaryOperator for icmp helpers; NFCI
This saves some casting in the helper functions and eases some further refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279478
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Mon, 22 Aug 2016 21:09:30 +0000 (21:09 +0000)]
[GraphTraits] Replace all NodeType usage with NodeRef
This should finish the GraphTraits migration.
Differential Revision: http://reviews.llvm.org/D23730
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279475
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 22 Aug 2016 20:51:00 +0000 (20:51 +0000)]
ADT: Remove ilist_*sentinel_traits, NFC
Remove all the dead code around ilist_*sentinel_traits. This is a
follow-up to gutting them as part of r279314 (originally r278974),
staged to prevent broken builds in sub-projects.
Uses were removed from clang in r279457 and lld in r279458.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279473
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 22 Aug 2016 20:45:06 +0000 (20:45 +0000)]
[InstCombine] use m_APInt to allow icmp (shr exact X, Y), 0 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279472
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 22 Aug 2016 20:38:53 +0000 (20:38 +0000)]
Add ADT headers to the cmake headers directory for LLVMSupport. NFC.
Xcode and MSVC list the headers and source files for each library.
LLVMSupport lists included the source files for ADT but not the headers. This
add the ADT headers so that they are browsable by the UI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279470
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 22 Aug 2016 20:18:28 +0000 (20:18 +0000)]
Add comments and an assert to follow-up on r279113. NFC.
Philip commented on r279113 to ask for better comments as to
when to use the different versions of getName. Its also possible
to assert in the simple case that we aren't an overloaded intrinsic
as those have to use the more capable version of getName.
Thanks for the comments Philip.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279466
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 22 Aug 2016 19:52:23 +0000 (19:52 +0000)]
IDFCalculator: Remove unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279465
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 22 Aug 2016 19:33:16 +0000 (19:33 +0000)]
AMDGPU: Split SILowerControlFlow into two pieces
Do most of the lowering in a pre-RA pass. Keep the skip jump
insertion late, plus a few other things that require more
work to move out.
One concern I have is now there may be COPY instructions
which do not have the necessary implicit exec uses
if they will be lowered to v_mov_b32.
This has a positive effect on SGPR usage in shader-db.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279464
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 22 Aug 2016 19:14:30 +0000 (19:14 +0000)]
MSSA: Factor out phi node placement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279462
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 22 Aug 2016 19:14:16 +0000 (19:14 +0000)]
MSSA: Only rename accesses whose defining access is nullptr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279461
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 22 Aug 2016 19:07:15 +0000 (19:07 +0000)]
[SimplifyCFG] Rewrite SinkThenElseCodeToEnd
[Recommitting now an unrelated assertion in SROA is sorted out]
The new version has several advantages:
1) IMSHO it's more readable and neater
2) It handles loads and stores properly
3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch.
With this change we can now finally sink load-modify-store idioms such as:
if (a)
return *b += 3;
else
return *b += 4;
=>
%z = load i32, i32* %y
%.sink = select i1 %a, i32 5, i32 7
%b = add i32 %z, %.sink
store i32 %b, i32* %y
ret i32 %b
When this works for switches it'll be even more powerful.
Round 4. This time we should handle all instructions correctly, and not replace any operands that need to be constant with variables.
This was really hard to determine safely, so the helper function should be put into the Instruction API. I'll do that as a followup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279460
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 22 Aug 2016 18:49:42 +0000 (18:49 +0000)]
[SROA] Remove incorrect assertion
Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over.
Original differential: http://reviews.llvm.org/D16187
aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160815/382129.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279454
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Mon, 22 Aug 2016 18:26:27 +0000 (18:26 +0000)]
[SSP] Do not set __guard_local to hidden for OpenBSD SSP
__guard_local is defined as long on OpenBSD. If the source file contains
a definition of __guard_local, it mismatches with the int8 pointer type
used in LLVM. In that case, Module::getOrInsertGlobal() returns a
cast operation instead of a GlobalVariable. Trying to set the
visibility on the cast operation leads to random segfaults (seen when
compiling the OpenBSD kernel, which also runs with stack protection).
In the kernel, the hidden attribute does not matter. For userspace code,
__guard_local is defined as hidden in the startup code. If a program
re-defines __guard_local, the definition from the startup code will
either win or the linker complains about multiple definitions
(depending on whether the re-defined __guard_local is placed in the
common segment or not).
It also matches what gcc on OpenBSD does.
Thanks Stefan Kempf <sisnkemp@gmail.com> for the patch!
Differential Revision: http://reviews.llvm.org/D23674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279449
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 22 Aug 2016 18:21:56 +0000 (18:21 +0000)]
[InstCombine] Allow sinking from unique predecessor with multiple edges
Summary: We can allow sinking if the single user block has only one unique predecessor, regardless of the number of edges. Note that a switch statement with multiple cases can have the same destination.
Reviewers: mcrosier, majnemer, spatel, reames
Subscribers: reames, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D23722
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279448
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 22 Aug 2016 18:13:12 +0000 (18:13 +0000)]
Revert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"
This reverts commit r279443. It caused buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279447
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 22 Aug 2016 17:40:23 +0000 (17:40 +0000)]
[SimplifyCFG] Rewrite SinkThenElseCodeToEnd
The new version has several advantages:
1) IMSHO it's more readable and neater
2) It handles loads and stores properly
3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch.
With this change we can now finally sink load-modify-store idioms such as:
if (a)
return *b += 3;
else
return *b += 4;
=>
%z = load i32, i32* %y
%.sink = select i1 %a, i32 5, i32 7
%b = add i32 %z, %.sink
store i32 %b, i32* %y
ret i32 %b
When this works for switches it'll be even more powerful.
Round 4. This time we should handle all instructions correctly, and not replace any operands that need to be constant with variables.
This was really hard to determine safely, so the helper function should be put into the Instruction API. I'll do that as a followup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279443
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Aug 2016 16:47:55 +0000 (16:47 +0000)]
[X86][AVX] Don't use SubVectorBroadcast if there are additional users of the chain (PR29088)
We could improve on this by making X86SubVBroadcast a full memory intrinsic similar to X86vzload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279441
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 22 Aug 2016 16:41:58 +0000 (16:41 +0000)]
Fix Gold Plugin after API change in the LTO API (constify callback type)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279440
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 22 Aug 2016 16:18:42 +0000 (16:18 +0000)]
[mips][ias] Support .dtprel[d]word and .tprel[d]word directives
Assembler directives .dtprelword, .dtpreldword, .tprelword, and
.tpreldword generates relocations R_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL64,
R_MIPS_TLS_TPREL32, and R_MIPS_TLS_TPREL64 respectively.
The main motivation for this patch is to be able to write test cases
for checking correctness of the LLD linker's behaviour.
Differential Revision: https://reviews.llvm.org/D23669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279439
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 22 Aug 2016 16:17:40 +0000 (16:17 +0000)]
[LTO] Constify the Module Hook function (NFC)
It use to be non-const for the sole purpose of custom handling of
commons symbol. This is moved now in the regular LTO handling now
and such we can constify the callback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279438
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 22 Aug 2016 14:50:12 +0000 (14:50 +0000)]
Reset isUndef when removing subreg from a def operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279437
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Aug 2016 13:18:56 +0000 (13:18 +0000)]
[X86] Only accept SM_SentinelUndef (-1) as an undefined shuffle mask in range
As discussed on D23027 we should be trying to be more strict on what is an undefined mask value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279435
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 22 Aug 2016 13:18:19 +0000 (13:18 +0000)]
Remove missing file from r279433 reversal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279434
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 22 Aug 2016 13:14:07 +0000 (13:14 +0000)]
Revert -r278267 [ValueTracking] An improvement to IR ValueTracking on Non-negative Integers
This change cause performance regression on MultiSource/Benchmarks/TSVC/Symbolics-flt/Symbolics-flt from LNT and some other bechmarks.
See https://reviews.llvm.org/D18777 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279433
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 22 Aug 2016 13:12:07 +0000 (13:12 +0000)]
Revert -r278269 [IndVarSimplify] Eliminate zext of a signed IV when the IV is known to be non-negative
This change needs to be reverted in order to revert -r278267 which cause performance regression on MultiSource/Benchmarks/TSVC/Symbolics-flt/Symbolics-flt from LNT and some other bechmarks.
See comments on https://reviews.llvm.org/D18777 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279432
91177308-0d34-0410-b5e6-
96231b3b80d8
Balaram Makam [Mon, 22 Aug 2016 12:59:58 +0000 (12:59 +0000)]
[PM] Port LoopDataPrefetch AArch64 tests to new pass manager
Reviewers: mcrosier, tejohnson
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D23724
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279431
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Aug 2016 12:56:54 +0000 (12:56 +0000)]
[X86][SSE] Avoid specifying unused arguments in SHUFPD lowering
As discussed on PR26491, we are missing the opportunity to make use of the smaller MOVHLPS instruction because we set both arguments of a SHUFPD when using it to lower a single input shuffle.
This patch sets the lowered argument to UNDEF if that shuffle element is undefined. This in turn makes it easier for target shuffle combining to decode UNDEF shuffle elements, allowing combines to MOVHLPS to occur.
A fix to match against MOVHPD stores was necessary as well.
This builds on the improved MOVLHPS/MOVHLPS lowering and memory folding support added in D16956
Adding similar support for SHUFPS will have to wait until have better support for target combining of binary shuffles.
Differential Revision: https://reviews.llvm.org/D23027
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279430
91177308-0d34-0410-b5e6-
96231b3b80d8
Hrvoje Varga [Mon, 22 Aug 2016 12:17:59 +0000 (12:17 +0000)]
[mips][microMIPS] Implement BLTZC, BLEZC, BGEZC and BGTZC instructions, fix disassembly and add operand checking to existing B<cond>C implementations
Differential Revision: https://reviews.llvm.org/D22667
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279429
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 22 Aug 2016 11:55:22 +0000 (11:55 +0000)]
[MC] Remove guard(s). NFCI.
All the methods are already marked with
LLVM_DUMP_METHOD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279428
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 22 Aug 2016 10:49:37 +0000 (10:49 +0000)]
[ThinLTO][X86] Fix windows build
Windows 'rm' complains about non-existent files if a wildcard is used. Be more explicit about the files deleted to avoid this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279426
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 07:38:50 +0000 (07:38 +0000)]
[X86] Create a new instruction format to handle 4VOp3 encoding. This saves one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279424
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 07:38:45 +0000 (07:38 +0000)]
[X86] Create a new instruction format to handle MemOp4 encoding. This saves one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279423
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 07:38:41 +0000 (07:38 +0000)]
[X86] Space out the encodings of X86 instruction formats. I plan to add some new encodings in future commits and this will reduce the size of those commits. NFC
This tries to keep all the ModRM memory and register forms in their own regions of the encodings. Hoping to make it simple on some of the switch statements that operate on these encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279422
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 07:38:36 +0000 (07:38 +0000)]
[X86] Merge small helper function into the switch that calls it since they both operate on the same variable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279421
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 07:38:30 +0000 (07:38 +0000)]
[X86] Explicitly list all X86 instruction forms in switch statement so its easier to detect when one is missing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279420
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 22 Aug 2016 06:37:41 +0000 (06:37 +0000)]
Add REQUIRES:X86 to test/tools/llvm-lto2/common.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279418
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 22 Aug 2016 06:25:46 +0000 (06:25 +0000)]
[LTO] Handles commons in monolithic LTO
The gold-plugin was doing this internally, now the API is handling
commons correctly based on the given resolution.
Differential Revision: https://reviews.llvm.org/D23739
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279417
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 22 Aug 2016 06:25:41 +0000 (06:25 +0000)]
[LTO] Add a "CodeGenOnly" option. Allows the client to skip the optimizer.
Summary: Slowly getting on par with libLTO
Reviewers: tejohnson
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23615
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279416
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 22 Aug 2016 04:16:14 +0000 (04:16 +0000)]
[asan] Use 1 byte aligned stores to poison shadow memory
Summary: r279379 introduced crash on arm 32bit bot. I suspect this is alignment issue.
Reviewers: eugenis
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D23762
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279413
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 01:37:19 +0000 (01:37 +0000)]
[X86] Merge hasVEX_i8ImmReg into the ImmFormat type which had extra unused encodings. This saves one bit in TSFlags. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279412
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 22 Aug 2016 01:37:16 +0000 (01:37 +0000)]
[X86] Remove ignoreVEX_L from TSFlags. Only the disassembler needs it and the disassembler doesn't use TSFlags. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279411
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 22 Aug 2016 00:58:47 +0000 (00:58 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279409
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 22 Aug 2016 00:58:04 +0000 (00:58 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279408
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 19:56:02 +0000 (19:56 +0000)]
[CostModel][X86] Removed shift tests
There are more thorough tests found in vshift-*-cost.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279406
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 19:44:44 +0000 (19:44 +0000)]
[CostModel][X86] Added costs for vXi16 and vXi8 vectors for add/sub/mul/and/or/xor tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279405
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 19:14:48 +0000 (19:14 +0000)]
[CostModel][X86] Replaced SSSE3 with SSE2 costs to create a better baseline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279404
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 19:06:25 +0000 (19:06 +0000)]
[CostModel][X86] Added fsqrt and fma costs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279403
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 18:34:47 +0000 (18:34 +0000)]
[CostModel][X86] Split off float arithmetic cost tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279402
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Aug 2016 17:10:07 +0000 (17:10 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 4
This concludes the fixes for icmp+shl in this series:
https://reviews.llvm.org/rL279339
https://reviews.llvm.org/rL279398
https://reviews.llvm.org/rL279399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279401
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Aug 2016 16:40:42 +0000 (16:40 +0000)]
remove FIXME comment; fixed by previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279400
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Aug 2016 16:35:34 +0000 (16:35 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 3
This is a partial enablement (move the ConstantInt guard down).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279399
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Aug 2016 16:28:22 +0000 (16:28 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 2
This is a partial enablement (move the ConstantInt guard down).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279398
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 21 Aug 2016 15:39:45 +0000 (15:39 +0000)]
[X86][AVX] Dropped combineShuffle256 - this can now be performed by EltsFromConsecutiveLoads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279397
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 21 Aug 2016 15:07:45 +0000 (15:07 +0000)]
[InstCombine] use APInt instead of ConstantInt in isSignBitCheck(); NFCI
The callers still have ConstantInt guards, so there is no functional change
intended from this change. But relaxing the callers will allow more folds
for vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279396
91177308-0d34-0410-b5e6-
96231b3b80d8
Guy Blank [Sun, 21 Aug 2016 08:02:27 +0000 (08:02 +0000)]
[AVX512][FastISel] Do not use K registers in TEST instructions
In some cases, FastIsel was emitting TEST instruction with K reg input, which is illegal.
Changed to using KORTEST when dealing with K regs.
Differential Revision: https://reviews.llvm.org/D23163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279393
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 21 Aug 2016 00:08:10 +0000 (00:08 +0000)]
ARM: Avoid dereferencing end() in ARMFrameLowering::emitEpilogue
This fixes the crash from PR29072, where the MachineBasicBlock::iterator
wasn't being properly checked against MachineBasicBlock::end() before
iterating. This was another bug exposed by the new
ilist::iterator::operator*() assertion from r279314.
This testcase is poor quality. bugpoint couldn't reduce any further,
and I haven't had time to dig into what's going on so I can't invent a
better one. I didn't even get good CHECK lines in: this is just a
crasher.
I'm committing anyway since this is a real crash with an obvious fix,
but I'll leave PR29072 open and ask an ARM maintainer to help improve
the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279391
91177308-0d34-0410-b5e6-
96231b3b80d8
Todd Fiala [Sat, 20 Aug 2016 23:24:02 +0000 (23:24 +0000)]
Fix broken macOS LLDB Xcode build from r279314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279390
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 23:09:57 +0000 (23:09 +0000)]
[X86][SSE] Regenerate 32-bit buildvector test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279389
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 22:00:53 +0000 (22:00 +0000)]
[X86][SSE] Regenerate subvector extraction widening test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279388
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 21:56:33 +0000 (21:56 +0000)]
[X86] Regenerate fp truncate tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279387
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 21:37:30 +0000 (21:37 +0000)]
Regenerate test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279386
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 21:35:45 +0000 (21:35 +0000)]
Regenerate test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279385
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 21:07:41 +0000 (21:07 +0000)]
[X86][XOP] Tweak vpermil2pd test to stop it being combined away
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279384
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 20 Aug 2016 20:23:50 +0000 (20:23 +0000)]
[asan] Minimize code size by using __asan_set_shadow_* for large blocks
Summary:
We can insert function call instead of multiple store operation.
Current default is blocks larger than 64 bytes.
Changes are hidden behind -asan-experimental-poisoning flag.
PR27453
Differential Revision: https://reviews.llvm.org/D23711
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279383
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 20:04:18 +0000 (20:04 +0000)]
Use SDValue::getOpcode() helper instead of via SDValue::getNode()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279381
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 20 Aug 2016 18:34:39 +0000 (18:34 +0000)]
[asan] Initialize __asan_set_shadow_* callbacks
Summary:
Callbacks are not being used yet.
PR27453
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23634
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279380
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 20 Aug 2016 18:34:36 +0000 (18:34 +0000)]
[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Summary: Reduce store size to avoid leading and trailing zeros.
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279379
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 20 Aug 2016 17:22:27 +0000 (17:22 +0000)]
[asan] Cleanup instrumentation of dynamic allocas
Summary:
Extract instrumenting dynamic allocas into separate method.
Rename asan-instrument-allocas -> asan-instrument-dynamic-allocas
Differential Revision: https://reviews.llvm.org/D23707
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279376
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 20 Aug 2016 17:07:38 +0000 (17:07 +0000)]
[X86][SSE] Added vector interleave test (PR21281)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279375
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 20 Aug 2016 16:48:24 +0000 (16:48 +0000)]
[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Summary:
We are going to combine poisoning of red zones and scope poisoning.
PR27453
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279373
91177308-0d34-0410-b5e6-
96231b3b80d8