Commit Graph

61231 Commits

Author SHA1 Message Date
Tom Stellard
3001340c23 Attempt to fix the mingw32 bot.
This should hopefully fix
http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32

Merged from r182446
Author: Rafael Espindola <rafael.espindola@gmail.com>
Date:   Wed May 22 02:30:47 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@190579 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 03:18:11 +00:00
Tom Stellard
07c8da8d24 Make PrologEpilogInserter save/restore all callee saved registers
in functions which call __builtin_unwind_init()

__builtin_unwind_init() is an undocumented gcc intrinsic which has this effect,
and is used in libgcc_eh.

Goes part of the way toward fixing PR8541.

Merged from r183984
Author: Derek Schuff <dschuff@google.com>
Date:   Fri Jun 14 16:15:29 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@190578 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 03:18:08 +00:00
Tom Stellard
f667db3652 PR15662: Optimized debug info produces out of order function parameters
When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any remaining
unused parameters.

If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.

This fix causes us to always keep the arg variables at the start of the
variable list & in the original order from the source.

Merged from r183297
Author: David Blaikie <dblaikie@gmail.com>
Date:   Wed Jun 5 05:39:59 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@186678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-19 14:51:27 +00:00
Tom Stellard
08745de15d AArch64: add CMake dependency to fix very parallel builds
Merged from r182190
Author: Tim Northover <t.p.northover@gmail.com>
Date:   Sat May 18 08:17:47 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@186677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-19 14:51:22 +00:00
Tom Stellard
7dfcb84fc1 Fix for a regression caused by the LoopVectorizer when
vectorizing loops with memory accesses to non-zero address spaces. It
simply dropped the AS info. Fixes PR16306.


Merged from r184103
Author: Pekka Jaaskelainen <pekka.jaaskelainen@tut.fi>
Date:   Mon Jun 17 18:49:06 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@185869 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:20:34 +00:00
Tom Stellard
c4a246996d R600: Fix R600ControlFlowFinalizer not considering VTX_READ 128 bit dst reg
Patch by: Vincent Lejeune

https://bugs.freedesktop.org/show_bug.cgi?id=64877

NOTE: This is a candidate for the 3.3 branch.


Merged from r182600
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Thu May 23 18:26:42 2013 +0000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@185868 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:20:22 +00:00
Bill Wendling
1419ad7b43 Merging r183035:
------------------------------------------------------------------------
r183035 | arnolds | 2013-05-31 12:53:50 -0700 (Fri, 31 May 2013) | 7 lines

LoopVectorize: PHIs with only outside users should prevent vectorization

We check that instructions in the loop don't have outside users (except if
they are reduction values). Unfortunately, we skipped this check for
if-convertable PHIs.

Fixes PR16184.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183189 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 04:35:28 +00:00
Bill Wendling
6d47c5afcb Merging r183108:
------------------------------------------------------------------------
r183108 | vljn | 2013-06-03 08:44:42 -0700 (Mon, 03 Jun 2013) | 1 line

R600: CALL_FS consumes a stack size entry
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 04:24:41 +00:00
Andrew Trick
6f2ae41d21 Merge 183060: Prevent loop-unroll from making assumptions about undefined behavior.
Fixes rdar:14036816, PR16130.

    There is an opportunity to compute precise trip counts for 'or'
    expressions and multi-exit loops.
    rdar:14038809: Optimize trip count computation for multi-exit loops.

    To do this we need to record the fact that ExitLimit assumes NSW. When
    it does not we can safely assume that the loop trip count is the
    minimum ExitLimt across all subexpressions and loop exits.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 01:37:44 +00:00
Andrew Trick
7ce804a625 Merging 182989: Fix ScalarEvolution::ComputeExitLimitFromCond for 'or' conditions.
Fixes PR16130 - clang produces incorrect code with loop/expression at -O2.

    This is a 2+ year old bug that's now holding up the release. It's a
    case where we knowingly made aggressive assumptions about undefined
    behavior. These assumptions are wrong when SCEV is computing a
    subexpression that does not directly control the branch. With this
    fix, we avoid making assumptions in those cases but still optimize the
    common case. SCEV's trip count computation for exits controlled by
    'or' expressions is now analagous to the trip count computation for
    loops with multiple exits. I had already fixed the multiple exit case
    to be conservative.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183013 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 16:06:18 +00:00
Bill Wendling
a3f63b961f Merging r182585:
------------------------------------------------------------------------
r182585 | aaronballman | 2013-05-23 07:55:00 -0700 (Thu, 23 May 2013) | 1 line

Setting the default value (fixes CRT assertions about uninitialized variable use when doing debug MSVC builds), and fixing coding style.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:57:03 +00:00
Bill Wendling
89d9794d49 Merging r182394:
------------------------------------------------------------------------
r182394 | jholewinski | 2013-05-21 09:51:30 -0700 (Tue, 21 May 2013) | 1 line

[NVPTX] Add @llvm.nvvm.sqrt.f() intrinsic
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:56:17 +00:00
Bill Wendling
afa582f1cd Merging r182298:
------------------------------------------------------------------------
r182298 | jholewinski | 2013-05-20 09:42:18 -0700 (Mon, 20 May 2013) | 1 line

[NVPTX] Fix mis-use of CurrentFnSym in NVPTXAsmPrinter.  This was causing a symbol name error in the output PTX.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182828 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:55:34 +00:00
Bill Wendling
f3d2075c75 Merging r182297:
------------------------------------------------------------------------
r182297 | jholewinski | 2013-05-20 09:42:16 -0700 (Mon, 20 May 2013) | 1 line

[NVPTX] Add programmatic interface to NVVMReflect pass
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182827 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:54:56 +00:00
Bill Wendling
b47f06ee6c Merging r182254:
------------------------------------------------------------------------
r182254 | jholewinski | 2013-05-20 05:13:32 -0700 (Mon, 20 May 2013) | 12 lines

[NVPTX] Add GenericToNVVM IR converter to better handle idiomatic LLVM IR inputs

This converter currently only handles global variables in address space 0. For
these variables, they are promoted to address space 1 (global memory), and all
uses are updated to point to the result of a cvta.global instruction on the new
variable.

The motivation for this is address space 0 global variables are illegal since we
cannot declare variables in the generic address space.  Instead, we place the
variables in address space 1 and explicitly convert the pointer to address
space 0. This is primarily intended to help new users who expect to be able to
place global variables in the default address space.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:54:20 +00:00
Bill Wendling
a12cd23d07 Merging r182253:
------------------------------------------------------------------------
r182253 | jholewinski | 2013-05-20 05:13:28 -0700 (Mon, 20 May 2013) | 1 line

[NVPTX] Fix i1 kernel parameters and global variables.  ABI rules say we need to use .u8 for i1 parameters for kernels.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 06:53:35 +00:00
Bill Wendling
da897215b2 Merging r182656:
------------------------------------------------------------------------
r182656 | d0k | 2013-05-24 11:05:35 -0700 (Fri, 24 May 2013) | 3 lines

LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases.

Fixes PR16139.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 18:37:09 +00:00
Bill Wendling
1df0680640 Merging r182485:
------------------------------------------------------------------------
r182485 | arnolds | 2013-05-22 09:54:56 -0700 (Wed, 22 May 2013) | 7 lines

LoopVectorize: Make Value pointers that could be RAUW'ed a VH

The Value pointers we store in the induction variable list can be RAUW'ed by a
call to SCEVExpander::expandCodeFor, use a TrackingVH instead. Do the same thing
in some other places where we store pointers that could potentially be RAUW'ed.

Fixes PR16073.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 17:30:06 +00:00
Bill Wendling
62131ab280 Merging r182486:
------------------------------------------------------------------------
r182486 | d0k | 2013-05-22 10:01:12 -0700 (Wed, 22 May 2013) | 3 lines

X86: When expanding PCMPGTQ to PCMPGTD we always want to compare the lower halves as unsigned.

Take #2 on fixing PR15977.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182489 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 17:23:54 +00:00
Bill Wendling
5a262f36de Merging r181363:
------------------------------------------------------------------------
r181363 | cdavis | 2013-05-07 14:14:15 -0700 (Tue, 07 May 2013) | 3 lines

MCStreamer: Also clear vector of W64UnwindInfos on reset().

Patch by Kai Nacke!
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182439 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 23:48:15 +00:00
Bill Wendling
595bc150b4 Merging r181366:
------------------------------------------------------------------------
r181366 | enderby | 2013-05-07 14:40:58 -0700 (Tue, 07 May 2013) | 6 lines

Fix a bug in the MC asm parser evaluating expressions.  It was treating:
A = 9
B = 3 * A - 2 * A + 1 as  B = 3 * A - (2 * A + 1)

rdar://13816516

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 23:47:17 +00:00
Bill Wendling
3d3a37ed4d Merging r182385:
------------------------------------------------------------------------
r182385 | hfinkel | 2013-05-21 07:21:09 -0700 (Tue, 21 May 2013) | 9 lines

Fix PPC branch selection for counter-based branches

Although I had added some support for the BDZ/BDNZ branches into the selector
(in r158204), I had not correctly adjusted the condition at the top of the
loop. As a result, these branches were still essentially unsupported.

This fixes PR16086. Unfortunately, any test case would be very large (because
it would need to force the loop backedge to exceed the range of the 16-bit
immediate).
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 22:11:11 +00:00
Bill Wendling
629c73232c Merging r182387:
------------------------------------------------------------------------
r182387 | jholewinski | 2013-05-21 07:37:16 -0700 (Tue, 21 May 2013) | 7 lines

Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.

The intrinsic calls are dropped, but the annotated value is propagated.

Fixes PR 15253

Original patch by Zeng Bin!
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 20:23:13 +00:00
Bill Wendling
bb120a12ce Merging r182112:
------------------------------------------------------------------------
r182112 | tstellar | 2013-05-17 08:23:12 -0700 (Fri, 17 May 2013) | 1 line

R600: Pass MCSubtargetInfo reference to R600CodeEmitter
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182416 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 20:21:23 +00:00
Bill Wendling
5f5295224d Merging r182364:
------------------------------------------------------------------------
r182364 | d0k | 2013-05-21 02:58:54 -0700 (Tue, 21 May 2013) | 4 lines

X86: When emulating unsigned PCMPGTQ with PCMPGTD, fix the sign bit for the smaller type.

Otherwise we'll get a mix of signed and unsigned compares.
Fixes PR15977.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182413 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 20:13:22 +00:00
Bill Wendling
717979bbd0 Merging r182344:
------------------------------------------------------------------------
r182344 | mren | 2013-05-20 17:57:22 -0700 (Mon, 20 May 2013) | 7 lines

Dwarf: use a single line table to generate assembly when .loc is used.

This is to fix PR15408 where an undefined symbol Lline_table_start1 is used.
Since we do not generate the debug_line section when .loc is used,
Lline_table_start1 is not emitted and we can't refer to it when calculating
at_stmt_list for a compile unit.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 01:03:46 +00:00
Bill Wendling
f86bbdcdad Merging r182113:
------------------------------------------------------------------------
r182113 | tstellar | 2013-05-17 08:23:21 -0700 (Fri, 17 May 2013) | 9 lines

R600: Fix encoding for R600 family GPUs

Reviewed-by: Vincent Lejeune <vljn@ovi.com>

https://bugs.freedesktop.org/show_bug.cgi?id=64193
https://bugs.freedesktop.org/show_bug.cgi?id=64257
https://bugs.freedesktop.org/show_bug.cgi?id=64320

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 23:36:26 +00:00
Bill Wendling
ed3c685148 Merging r181706:
------------------------------------------------------------------------
r181706 | rafael | 2013-05-13 07:34:48 -0700 (Mon, 13 May 2013) | 1 line

Remove unused fields and arguments.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182147 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 18:49:56 +00:00
Bill Wendling
5b39b74a3f Merging r181529:
------------------------------------------------------------------------
r181529 | void | 2013-05-09 11:21:45 -0700 (Thu, 09 May 2013) | 8 lines

Simplify the code a bit.

The compact unwind registers were defined in two different
places. It's better just to place them in the function that uses them
and specify that this is a 64-bit or 32-bit machine.

No functionality change.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181956 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:30:10 +00:00
Bill Wendling
2fc0483faf Merging r181540:
------------------------------------------------------------------------
r181540 | void | 2013-05-09 13:10:38 -0700 (Thu, 09 May 2013) | 11 lines

Generate a compact unwind encoding in the face of a stack alignment push.

We generate a `push' of a random register (%rax) if the stack needs to be
aligned by the size of that register. However, this could mess up compact unwind
generation. In particular, we want to still generate compact unwind in the
presence of this monstrosity.

Check if the push of of the %rax/%eax register. If it is and it's marked with
the `FrameSetup' flag, then we can generate a compact unwind encoding for the
function only if the push is the last FrameSetup instruction.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181955 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:29:29 +00:00
Bill Wendling
d9b720d279 Merging r181580:
------------------------------------------------------------------------
r181580 | tstellar | 2013-05-09 19:09:45 -0700 (Thu, 09 May 2013) | 10 lines

R600: Remove AMDILPeeopholeOptimizer and replace optimizations with tablegen patterns

The BFE optimization was the only one we were actually using, and it was
emitting an intrinsic that we don't support.

https://bugs.freedesktop.org/show_bug.cgi?id=64201

Reviewed-by: Christian König <christian.koenig@amd.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:27:57 +00:00
Bill Wendling
91310e4a30 Merging r181579:
------------------------------------------------------------------------
r181579 | tstellar | 2013-05-09 19:09:39 -0700 (Thu, 09 May 2013) | 8 lines

R600: Expand SUB for v2i32/v4i32

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181953 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:27:42 +00:00
Bill Wendling
3e17699c38 Merging r181578:
------------------------------------------------------------------------
r181578 | tstellar | 2013-05-09 19:09:34 -0700 (Thu, 09 May 2013) | 10 lines

R600: Expand MUL for v4i32/v2i32

Fixes piglit test for OpenCL builtin mul24, and allows mad24 to run.

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181952 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:27:29 +00:00
Bill Wendling
0b74e32c2e Merging r181577:
------------------------------------------------------------------------
r181577 | tstellar | 2013-05-09 19:09:29 -0700 (Thu, 09 May 2013) | 10 lines

R600: Expand SRA for v4i32/v2i32

v2: Add v4i32 test

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181951 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:27:17 +00:00
Bill Wendling
717969d98f Merging r181576:
------------------------------------------------------------------------
r181576 | tstellar | 2013-05-09 19:09:24 -0700 (Thu, 09 May 2013) | 10 lines

R600: Expand vselect for v4i32 and v2i32

v2: Add vselect v4i32 test

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:27:04 +00:00
Bill Wendling
89b909942f Merging r181792:
------------------------------------------------------------------------
r181792 | tstellar | 2013-05-14 07:42:56 -0700 (Tue, 14 May 2013) | 8 lines

R600/SI: Add processor type for Hainan asic

Patch by: Alex Deucher

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

NOTE: This is a candidate for the 3.3 branch.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 00:16:45 +00:00
Bill Wendling
a3d7a30740 Merging r181842:
------------------------------------------------------------------------
r181842 | arnolds | 2013-05-14 15:33:24 -0700 (Tue, 14 May 2013) | 14 lines

ARM ISel: Don't create illegal types during LowerMUL

The transformation happening here is that we want to turn a
"mul(ext(X), ext(X))" into a "vmull(X, X)", stripping off the extension. We have
to make sure that X still has a valid vector type - possibly recreate an
extension to a smaller type. In case of a extload of a memory type smaller than
64 bit we used create a ext(load()). The problem with doing this - instead of
recreating an extload - is that an illegal type is exposed.

This patch fixes this by creating extloads instead of ext(load()) sequences.

Fixes PR15970.

radar://13871383
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 23:41:52 +00:00
Bill Wendling
5b85a9b5ad Merging r181524:
------------------------------------------------------------------------
r181524 | rafael | 2013-05-09 10:22:59 -0700 (Thu, 09 May 2013) | 4 lines

Don't replace an alias in llvm.used with its target.

When we replace an internal alias with its target, be careful not to
replace the entry in llvm.used (and llvm.compiler_used).
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 18:16:42 +00:00
Bill Wendling
b1ecefd0b5 Merging r181450:
------------------------------------------------------------------------
r181450 | uweigand | 2013-05-08 10:50:07 -0700 (Wed, 08 May 2013) | 16 lines


[PowerPC] Fix regression in generating @ha/@l relocs

The patch I committed as revision 167864 introduced a regression that
causes LLVM to no longer generate appropriate relocs for @ha/@l symbol
references (but fail an assertion instead).

This is fixed here by re-enabling support for the VK_PPC_GAS_HA16/
VK_PPC_GAS_LO16 variant kinds (and their Darwin variants) in
PPCELFObjectWriter.cpp.

Tested by running projects/test-suite in -m32 mode with the integrated
assembler forced on.  A standalone test case will be committed shortly
as well.


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181816 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 18:35:11 +00:00
Bill Wendling
52b488a3f8 Merging r181800:
------------------------------------------------------------------------
r181800 | wschmidt | 2013-05-14 09:08:32 -0700 (Tue, 14 May 2013) | 15 lines

PPC32: Fix stack collision between FP and CR save areas.

The changes to CR spill handling missed a case for 32-bit PowerPC.
The code in PPCFrameLowering::processFunctionBeforeFrameFinalized()
checks whether CR spill has occurred using a flag in the function
info.  This flag is only set by storeRegToStackSlot and
loadRegFromStackSlot.  spillCalleeSavedRegisters does not call
storeRegToStackSlot, but instead produces MI directly.  Thus we don't
see the CR is spilled when assigning frame offsets, and the CR spill
ends up colliding with some other location (generally the FP slot).

This patch sets the flag in spillCalleeSavedRegisters for PPC32 so
that the CR spill is properly detected and gets its own slot in the
stack frame.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 18:34:27 +00:00
Bill Wendling
06362e2450 Merging r181586:
------------------------------------------------------------------------
r181586 | d0k | 2013-05-10 02:16:52 -0700 (Fri, 10 May 2013) | 3 lines

InstCombine: Verify the type before transforming uitofp into select.

PR15952.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181813 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 18:30:01 +00:00
Bill Wendling
0a3c6b4fcc Merging r181397:
------------------------------------------------------------------------
r181397 | nicholas | 2013-05-08 02:00:10 -0700 (Wed, 08 May 2013) | 3 lines

Fix a bug in codegenprep where it was losing track of values OptimizeMemoryInst
by switching to a ValueMap. Patch by Andrea DiBiagio!

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181619 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 18:23:11 +00:00
Bill Wendling
5f32469bd4 Merging r181423:
------------------------------------------------------------------------
r181423 | hfinkel | 2013-05-08 05:16:14 -0700 (Wed, 08 May 2013) | 5 lines

PPCInstrInfo::optimizeCompareInstr should not optimize FP compares

The floating-point record forms on PPC don't set the condition register bits
based on a comparison with zero (like the integer record forms do), but rather
based on the exception status bits.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181507 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 07:33:50 +00:00
Bill Wendling
c7594e48ed Merging r181286:
------------------------------------------------------------------------
r181286 | arnolds | 2013-05-06 21:37:05 -0700 (Mon, 06 May 2013) | 7 lines

LoopVectorize: getConsecutiveVector must respect signed arithmetic

We were passing an i32 to ConstantInt::get where an i64 was needed and we must
also pass the sign if we pass negatives numbers. The start index passed to
getConsecutiveVector must also be signed.

Should fix PR15882.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181455 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 18:13:06 +00:00
Richard Sandiford
93618a91c6 Merge of r181312
[SystemZ] Fix InitMCCodeGenInfo call

createSystemZMCCodeGenInfo was not passing the optimization level to
InitMCCodeGenInfo(), so -O0 would be ignored.  Fixes DebugInfo/namespace.ll
after the changes in r181271.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 09:40:09 +00:00
Bill Wendling
da04487b82 Merging r181313:
------------------------------------------------------------------------
r181313 | mkuper | 2013-05-07 07:05:33 -0700 (Tue, 07 May 2013) | 1 line

Re-enable AVX detection on x64 platforms.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181399 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 09:15:09 +00:00
Bill Wendling
f4e04ae3a7 Merging r181296:
------------------------------------------------------------------------
r181296 | timurrrr | 2013-05-07 00:47:47 -0700 (Tue, 07 May 2013) | 1 line

Fix the VS2010 build broken by r181271
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181379 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 00:28:30 +00:00
David Blaikie
d2e0f7ee15 DebugInfo: Support imported modules in lexical blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 23:33:07 +00:00
Tom Stellard
3d834a44f6 R600/SI: Add intrinsic for MIMG IMAGE_GET_RESINFO opcode
Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181269 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 23:02:19 +00:00
Tom Stellard
ea73bd8a54 R600/SI: Handle arbitrary destination type in SITargetLowering::adjustWritemask
Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 23:02:15 +00:00