Commit Graph

39744 Commits

Author SHA1 Message Date
Sanjay Patel
c5ddf50801 [TLI] isdigit / isascii / toascii param type should match return type (PR30484)
We crash in LibCallSimplifier if we don't check the validity of the function signature properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 18:44:09 +00:00
Matthias Braun
abd02b3ad6 ScheduleDAG: Match enum names when printing sdep kinds
It is less confusing to have the same names in the debug print as the
enum members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 18:28:31 +00:00
Jun Bum Lim
32ed609373 Enhance calcColdCallHeuristics for InvokeInst
Summary: When identifying cold blocks, consider only the edge to the normal destination if the terminator is InvokeInst and let calcInvokeHeuristics() decide edge weights for the InvokeInst.

Reviewers: mcrosier, hfinkel, davidxl

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 17:26:14 +00:00
James Molloy
3b62127542 Revert "[ARM] Promote small global constants to constant pools"
This reverts commit r282241. It caused http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/19882.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 13:35:43 +00:00
Nemanja Ivanovic
a04f9019ef [Power9] Exploit move and splat instructions for build_vector improvement
This patch corresponds to review:
https://reviews.llvm.org/D21135

This patch exploits the following instructions:
mtvsrws
lxvwsx
mtvsrdd
mfvsrld

In order to improve some build_vector and extractelement patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 13:25:31 +00:00
James Molloy
e2c1cbe138 [ARM] Promote small global constants to constant pools
If a constant is unamed_addr and is only used within one function, we can save
on the code size and runtime cost of an indirection by changing the global's storage
to inside the constant pool. For example, instead of:

      ldr r0, .CPI0
      bl printf
      bx lr
    .CPI0: &format_string
    format_string: .asciz "hello, world!\n"

We can emit:

      adr r0, .CPI0
      bl printf
      bx lr
    .CPI0: .asciz "hello, world!\n"

This can cause significant code size savings when many small strings are used in one
function (4 bytes per string).

This recommit contains fixes for a nasty bug related to fast-isel fallback - because
fast-isel doesn't know about this optimization, if it runs and emits references to
a string that we inline (because fast-isel fell back to SDAG) we will end up
with an inlined string and also an out-of-line string, and we won't emit the
out-of-line string, causing backend failures.

It also contains fixes for emitting .text relocations which made the sanitizer
bots unhappy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 12:15:58 +00:00
George Rimar
582d1a13f3 Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.""
Build bot issues (http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15856/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dump-gdbindex.test)
should be fixed in that version. Issue was that MSVS does not support "%zu". Though it works fine on MSCS 2015,
Bot looks running MSVS 2013 that does not like it. MSDN also says that "z" prefix is not supported: https://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx
I had to use PRId64 instead.

Original commit message:

[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.

gold linker's --gdb-index option currently is able to create the .gdb_index section that allows GDB to locate and read the .dwo files as it needs them,
this helps reduce the total size of the object files processed by the linker.

More info about that:
https://gcc.gnu.org/wiki/DebugFission
https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html

Patch teaches dwarfdump tool to dump this section.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 11:01:53 +00:00
George Rimar
53a7de61aa Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section."
It broke BB:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15856

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 10:12:56 +00:00
Alexey Bataev
b9dfeea817 [InstCombine] Fix for PR29124: reduce insertelements to shufflevector
If inserting more than one constant into a vector:

define <4 x float> @foo(<4 x float> %x) {
  %ins1 = insertelement <4 x float> %x, float 1.0, i32 1
  %ins2 = insertelement <4 x float> %ins1, float 2.0, i32 2
  ret <4 x float> %ins2
}

InstCombine could reduce that to a shufflevector:

define <4 x float> @goo(<4 x float> %x) {
 %shuf = shufflevector <4 x float> %x, <4 x float> <float undef, float 1.0, float 2.0, float undef>, <4 x i32><i32 0, i32 5, i32 6, i32 3>
 ret <4 x float> %shuf
}
Also, InstCombine tries to convert shuffle instruction to single insertelement, if one of the vectors is a constant vector and only a single element from this constant should be used in shuffle, i.e.
shufflevector <4 x float> %v, <4 x float> <float undef, float 1.0, float
undef, float undef>, <4 x i32> <i32 0, i32 5, i32 undef, i32 undef> ->
insertelement <4 x float> %v, float 1.0, 1

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282237 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 09:14:08 +00:00
George Rimar
b64f7d8843 [llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.
gold linker's --gdb-index option currently is able to create the .gdb_index section that allows GDB to locate and read the .dwo files as it needs them,
this helps reduce the total size of the object files processed by the linker.

More info about that:
https://gcc.gnu.org/wiki/DebugFission
https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html

Patch teaches dwarfdump tool to dump this section.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 09:09:26 +00:00
Tom Stellard
bf101a6e08 AMDGPU/SI: Include implicit arguments in kernarg_segment_byte_size
Reviewers: arsenm

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 01:33:26 +00:00
Petr Hosek
bdbe64e031 [MC] Support skip and count for .incbin directive
These optional arguments are supported by GNU assembler.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 00:41:06 +00:00
Sanjay Patel
38d30e5d19 [InstCombine] fold X urem C -> X < C ? X : X - C when C is big (PR28672)
We already have the udiv variant of this transform, so I think this is ok for 
InstCombine too even though there is an increase in IR instructions. As the 
tests and TODO comments show, the transform can lead to follow-on combines.

This should fix: https://llvm.org/bugs/show_bug.cgi?id=28672

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 22:36:26 +00:00
Vedant Kumar
ef76be0d1e [llvm-cov] Add the ability to specify directories of input source files
We've supported restricting coverage reports to a set of files for a
long time. Add support for being able to restrict by entire directories.

I suppose this supersedes D20803.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 21:49:43 +00:00
Hans Wennborg
579bab4252 Revert r282168 "GVN-hoist: fix store past load dependence analysis (PR30216)"
and also the dependent r282175 "GVN-hoist: do not dereference null pointers"

It's causing compiler crashes building Harfbuzz (PR30499).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 21:20:53 +00:00
Arnold Schwaighofer
d1714b5989 i386 does not support optimized swifterror handling
rdar://28432565

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 20:06:25 +00:00
Hans Wennborg
ba9e1e6b25 Win64: Don't emit unwind info for "leaf" functions (PR30337)
According to MSDN (see the PR), functions which don't touch any callee-saved
registers (including %rsp) don't need any unwind info.

This patch makes LLVM not emit unwind info for such functions, to save
binary size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 19:50:05 +00:00
Nemanja Ivanovic
f2f9e2bcc5 [PowerPC] Sign extend sub-word values for atomic comparisons
Atomic comparison instructions use the sub-word load instruction on
Power8 and up but the value is not sign extended prior to the signed word
compare instruction. This patch adds that sign extension.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 19:06:38 +00:00
Nirav Dave
489cfe73c2 [DAG] Fix incorrect alignment of ext load.
Correctly use alignment size from loaded size not output value size.

Reviewers: jyknight, tstellarAMD, arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 17:28:43 +00:00
Krzysztof Parzyszek
7b83fe6d98 [PPC] Set SP after loading data from stack frame, if no red zone is present
Follow-up to r280705: Make sure that the SP is only restored after all data
is loaded from the stack frame, if there is no red zone.

This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 17:22:43 +00:00
Sebastian Pop
3e55f3d023 GVN-hoist: fix store past load dependence analysis (PR30216)
To hoist stores past loads, we used to search for potential
conflicting loads on the hoisting path by following a MemorySSA
def-def link from the store to be hoisted to the previous
defining memory access, and from there we followed the def-use
chains to all the uses that occur on the hoisting path. The
problem is that the def-def link may point to a store that does
not alias with the store to be hoisted, and so the loads that are
walked may not alias with the store to be hoisted, and even as in
the testcase of PR30216, the loads that may alias with the store
to be hoisted are not visited.

The current patch visits all loads on the path from the store to
be hoisted to the hoisting position and uses the alias analysis
to ask whether the store may alias the load. I was not able to
use the MemorySSA functionality to ask for whether load and
store are clobbered: I'm not sure which function to call, so I
used a call to AA->isNoAlias().

Store past store is still working as before using a MemorySSA
query: I added an extra test to pr30216.ll to make sure store
past store does not regress.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 15:33:51 +00:00
Sebastian Pop
69580509c8 GVN-hoist: move hoist testcase to GVNHoist dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 14:45:46 +00:00
Sebastian Pop
afaf6ad3a7 GVN-hoist: only hoist relevant scalar instructions
Without this patch, GVN-hoist would think that a branch instruction is a scalar instruction
and would try to value number it. The patch filters out all such kind of irrelevant instructions.

A bit frustrating is that there is no easy way to discard all those very infrequent instructions,
a bit like isa<TerminatorInst> that stands for a large family of instructions. I'm thinking that
checking for those very infrequent other instructions would cost us more in compilation time
than just letting those instructions getting numbered, so I'm still thinking that a simpler check:

  if (isa<TerminatorInst>(I))
    return false;

is better than listing all the other less frequent instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282160 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 14:45:40 +00:00
Tim Northover
c63e7f7506 GlobalISel: handle stack-based parameters on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 13:49:25 +00:00
Anna Thomas
4bbf4cb69b [RS4GC] Remat in presence of phi and use live value
Summary:

Reviewers:

Subscribers:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 13:13:06 +00:00
Artem Tamazov
c228fe8466 [AMDGPU][mc] Add support for absolute expressions in DPP modifiers.
Also added range checking for DPP attributes.
Assembler tests added as well.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 11:47:21 +00:00
Nemanja Ivanovic
a941fe247e [Power9] Add exploitation of non-permuting memory ops
This patch corresponds to review:
https://reviews.llvm.org/D19825

The new lxvx/stxvx instructions do not require the swaps to line the elements
up correctly. In order to select them over the lxvd2x/lxvw4x instructions which
require swaps, the patterns for the old instruction have a predicate that
ensures they won't be selected on Power9 and newer CPUs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 09:52:19 +00:00
Sagar Thakur
5b1a39068c [EfficiencySanitizer] Using '$' instead of '#' for struct counter name
For MIPS '#' is the start of comment line. Therefore we get assembler errors if # is used in the structure names.

Differential: D24334
Reviewed by: zhaoqin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 08:33:06 +00:00
Dorit Nuzman
f2986e2ed1 Fix revision 281960
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 07:56:23 +00:00
Craig Topper
c7cbba03a9 [AVX-512] Add support for commuting VPTERNLOG instructions.
VPTERNLOG is a ternary instruction with an immediate specifying the logical operation to perform. For each bit position in the 3 source vectors the bit from each source is concatenated together and the resulting 3-bit value is used to select a bit in the immediate. This bit value is written to the result vector.

We can commute this by swapping operands and modifying the immediate. To modify the immediate we need to swap two pairs of bits. The pairs correspond to the locations in the immediate where the commuted operands bits have opposite values and the uncommuted operand has the same value. Bits 0 and 7 will never be swapped since the relevant bits from all sources are the same value.

This refactors and reuses parts of the FMA3 commuting code which is also a three operand instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 03:00:50 +00:00
Kevin Enderby
e10e0e3121 Next set of additional error checks for invalid Mach-O files for bad LC_UUID
load commands.  Added a missing check and made the check for more than
one like other other “more than one” checks.  And of course added test cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282104 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 20:03:09 +00:00
Chad Rosier
799bfde098 [LoopInterchange] Track all dependencies, not just anti dependencies.
Currently, we give up on loop interchange if we encounter a flow dependency
anywhere in the loop list. Worse yet, we don't even track output dependencies.

This patch updates the dependency matrix computation to track flow and output
dependencies in the same way we track anti dependencies.

This improves an internal workload by 2.2x.

Note the loop interchange pass is off by default and it can be enabled with
'-mllvm -enable-loopinterchange'

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 19:16:47 +00:00
Teresa Johnson
b81a1e9028 [ThinLTO] Emit files for distributed builds for all modules
With the new LTO API in r278338, we stopped emitting the individual
index files and imports files for some modules in the distributed backend
case (thinlto-index-only plugin option).

Specifically, this is when the linker decides not to include a module in the
link, because it was in an archive library and did not have a strong
reference to it. Not creating the expected output files makes the
distributed build system implementation more difficult, in terms of
checking for the expected outputs of the thin link, and scheduling the
backend jobs. To address this, the gold-plugin will write dummy empty
.thinlto.bc and .imports files for modules not included in the link
(which LTO never sees).

Augmented a gold v1.12+ test, since that version of gold has the handling
for notifying on modules not being included in the link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282100 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 19:12:05 +00:00
Nico Weber
5f630a9121 revert 281908 because 281909 got reverted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 18:25:43 +00:00
Arnold Schwaighofer
ad6572b3dd Disable tail calls if there is an swifterror argument
ISel does not handle them correctly yet i.e we crash trying to emit tail call
code.

radar://28407842

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 16:53:36 +00:00
Matthew Simpson
653eafda13 [LV] Don't emit unused scalars for uniform instructions
If we identify an instruction as uniform after vectorization, we know that we
should only use the value corresponding to the first vector lane of each unroll
iteration. However, when scalarizing such instructions, we still produce values
for the other vector lanes. This patch prevents us from generating the unused
scalars.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 16:50:24 +00:00
Artem Tamazov
4836a1b361 [AMDGPU][mc] Add support for ds_add_[rtn_]f32.
Lit tests added.
Resolves https://github.com/RadeonOpenCompute/hcc/issues/122.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 16:35:44 +00:00
Dehao Chen
aa30d2cf71 Change the basic block weight calculation algorithm to use max instead of voting.
Summary: Now that we have more precise debug info, we should change back to use maximum to get basic block weight.

Reviewers: dnovillo

Subscribers: andreadb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 16:26:51 +00:00
Cameron McInally
3d9ce2bac8 [AVX512] Fix return types on int_x86_avx512_gatherXXX_di intrinsics
The return type should match the pass through vector type.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 16:06:10 +00:00
Hans Wennborg
a613eb13a3 Revert r281895 "Add @llvm.dbg.value entries for the phi node created by -mem2reg"
(And follow-up r281964.)

It caused PR30468.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 15:55:53 +00:00
Nico Weber
f83ecb0d7e Revert r281715, it caused PR30475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 15:33:24 +00:00
Arnold Schwaighofer
e9993d5a21 DeadArgElim: Don't mark swifterror arguments as unused
Replacing swifterror arguments with undef creates invalid IR.

rdar://28300490

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 15:29:08 +00:00
Tim Northover
c297159d2f GlobalISel: produce correct code for signext/zeroext ABI flags.
We still don't really have an equivalent of "AssertXExt" in DAG, so we don't
exploit the guarantees on the receiving side yet, but this should produce
conservatively correct code on iOS ABIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 12:57:45 +00:00
Simon Dardis
abc7f410e9 [mips] LLVM PR/30197 - Tail call incorrectly clobbers arguments for mips
The postRA scheduler performs alias analysis to determine if stores and loads
can moved past each other. When a function has more arguments than argument
registers for the calling convention used, excess arguments are spilled onto the
stack. LLVM by default assumes that argument slots are immutable, unless the
function contains a tail call. Without the knowledge of that a function contains
a tail call site, stores and loads to fixed stack slots may be re-ordered
causing the out-going arguments to clobber the incoming arguments before the
incoming arguments are supposed to be dead.

Reviewers: vkalintiris

Differential Review: https://reviews.llvm.org/D24077



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 09:43:40 +00:00
Diana Picus
2c37c7740e Revert "AArch64: Set shift bit of TLSLE HI12 add instruction"
This reverts commit r282057 because it broke the buildbots - see e.g.
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12063

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 08:24:41 +00:00
Lei Liu
437db4fe24 AArch64: Set shift bit of TLSLE HI12 add instruction
Summary: AArch64 LLVM assembler emits add instruction without shift bit to calculate the higher 12-bit address of TLS variables in local exec model.  This generates wrong code sequence to access TLS variables with thread offset larger than 0x1000.

Reviewers: t.p.northover, peter.smith, rovka

Subscribers: salim.nasser, aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 07:41:41 +00:00
NAKAMURA Takumi
bba417d327 llvm/test/CodeGen/NVPTX/zero-cs.ll: Relax an expression to match in -Asserts.
LLVM ERROR: Cannot select: 0x3607bf0: i32 = ExternalSymbol'__powidf2'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 04:43:11 +00:00
Adam Nemet
860a9f5ba8 [LV] When reporting about a specific instruction without debug location use loop's
This can occur for example if some optimization drops the debug location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 03:14:20 +00:00
Jacques Pienaar
1d75557110 [NVPTX] Check if callsite is defined when computing argument allignment
Summary: In getArgumentAlignment check if the ImmutableCallSite pointer CS is non-null before dereferencing. If CS is 0x0 fall back to the ABI type alignment else compute the alignment as before.

Reviewers: eliben, jpienaar

Subscribers: jlebar, vchuravy, cfe-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 01:57:57 +00:00
Michael Kuperstein
86978b73fc [InferAttributes] Don't access parameters that don't exist.
Check for the correct number of parameters before querying their type.
This fixes PR30455.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-20 23:10:31 +00:00