Commit Graph

18411 Commits

Author SHA1 Message Date
Nick Lewycky
9d90163bc3 Teach the DataLayout aware constant folder to be much more aggressive towards
'and' instructions. This is a pattern that shows up a lot in ubsan binaries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175128 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 03:23:37 +00:00
Andrew Trick
fd1335e982 Revert "s/grep/FileCheck/ in some tests"
This reverts commit 8b75e6bc35.

The FileCheck tests are not equivalent:

test/CodeGen/X86/tailcall-structret.ll:6:10: error: expected string not found in input
; CHECK: jmp init
         ^
<stdin>:1:2: note: scanning from here
 .section __TEXT,__text,regular,pure_instructions
 ^
<stdin>:13:2: note: possible intended match here
 jmp _init ## TAILCALL
 ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175124 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 03:00:57 +00:00
Weiming Zhao
c0c2816fb3 temporarily revert the patch due to some conflicts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175107 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 23:24:40 +00:00
Anshuman Dasgupta
666e0d3bc4 Hexagon: add support for predicate-GPR copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175102 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 22:56:34 +00:00
Tom Stellard
76308d8d28 R600: Add support for 128-bit parameters
NOTE: This is a candidate for the Mesa stable branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175096 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 22:05:20 +00:00
Eli Bendersky
fa7c9efcd3 s/grep/FileCheck/ in some tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 22:00:37 +00:00
Eli Bendersky
8b75e6bc35 s/grep/FileCheck/ in some tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:46:38 +00:00
Weiming Zhao
3019fbbe6a Bug fix 13622: Add paired register support for inline asm with 64-bit data on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:43:02 +00:00
Chad Rosier
5867302b16 [ms-inline asm] Fix up test case for non-Darwin platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175087 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:41:58 +00:00
Jyotsna Verma
f6563427c4 Hexagon: Use absolute addressing mode loads/stores for global+offset
instead of redefining separate instructions for them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:38:46 +00:00
Chad Rosier
7b0bc3fe3e [ms-inline-asm] Add support for memory references that have non-immediate
displacements.
rdar://12974533


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:33:44 +00:00
Reed Kotler
6b9d461780 For Mips 16, add the optimization where the 16 bit form of addiu sp can be used
if the offset fits in 11 bits. This makes use of the fact that the abi
requires sp to be 8 byte aligned so the actual offset can fit in 8
bits. It will be shifted left and sign extended before being actually used.
The assembler or direct object emitter will shift right the 11 bit
signed field by 3 bits. We don't need to deal with that here.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 20:28:27 +00:00
Manman Ren
f098620095 Clean up LDV, no functionality change.
Remove dead functions: renameRegister
Move private member variables from LDV to Impl
Remove ssp/uwtable from testing case


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 20:23:48 +00:00
David Peixotto
af7c042af1 PR14992 - Tablegen incorrectly converts ARM tLDMIA_UPD pseudo to tLDMIA
Fixed bug in tablegen conversion when source pseudo instruction has
a different number of arguments than the destination instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 19:21:47 +00:00
Benjamin Kramer
f09e02f01a X86: Disable generation of rep;movsl when %esi is used as a base pointer.
This happens when there is both stack realignment and a dynamic alloca in the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
base pointer and the next register spill will write into oblivion.

Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic allocas
and freebsd a 4 byte stack alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175057 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 13:40:35 +00:00
Reed Kotler
8080696103 Make jumptables work for -static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 08:32:14 +00:00
Elena Demikhovsky
d29804f80d Prevent insertion of "vzeroupper" before call that preserves YMM registers, since a caller uses preserved registers across the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 08:02:04 +00:00
Eric Christopher
23571f4f2c Check i1 as well as i8 variables for 8 bit registers for x86 inline
assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 06:01:05 +00:00
Eric Christopher
a4e8694053 Finish obviously broken thought.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175035 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 06:01:00 +00:00
Kostya Serebryany
7bce462c15 [tsan] disable load widening in ThreadSanitizer mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 05:59:45 +00:00
Manman Ren
4be3853fd0 Debug Info: LiveDebugVarible can remove DBG_VALUEs, make sure we emit them back.
RegisterCoalescer used to depend on LiveDebugVariable. LDV removes DBG_VALUEs
without emitting them at the end.

We fix this by removing LDV from RegisterCoalescer. Also add an assertion to
make sure we call emitDebugValues if DBG_VALUEs are removed at
runOnMachineFunction.

rdar://problem/13183203
Reviewed by Andy & Jakob


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175023 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 01:14:49 +00:00
Krzysztof Parzyszek
b97c14b68f Remove target-specific info from the testcase for DWARF/pubnames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 18:53:21 +00:00
Chad Rosier
8915e27704 [ms-inline asm] Add support for lexing binary integers with a [bB] suffix.
This is complicated by backward labels (e.g., 0b can be both a backward label
and a binary zero).  The current implementation assumes [0-9]b is always a
label and thus it's possible for 0b and 1b to not be interpreted correctly for
ms-style inline assembly.  However, this is relatively simple to fix in the
inline assembly (i.e., drop the [bB]).

This patch also limits backward labels to [0-9]b, so that only 0b and 1b are
ambiguous.
Part of rdar://12470373


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174983 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 18:29:02 +00:00
Krzysztof Parzyszek
c5ef7eee3c Allow optionally generating pubnames section in DWARF info. Introduce
option "generate-dwarf-pubnames" to control it, set to "false" by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174981 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 18:00:14 +00:00
Kay Tiong Khoo
9a790581c0 added test cases for r174920 (prefetch disassembly)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 17:07:44 +00:00
Paul Redmond
de53477c91 Fix the lit test added in r174972
Patch by: Kevin Schoedel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174974 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 16:07:27 +00:00
Jyotsna Verma
6b8d2026ba Hexagon: Add support to generate predicated absolute addressing mode
instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 16:06:23 +00:00
Paul Redmond
5c97450df7 PR14562 - Truncation of left shift became undef
DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32))
into (shl i32 v, 32) into undef. To prevent this, check the shift count
against the final result size.

Patch by: Kevin Schoedel
Reviewed by: Nadav Rotem


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 15:21:21 +00:00
Justin Holewinski
7eacad03ef [NVPTX] Disable vector registers
Vectors were being manually scalarized by the backend.  Instead,
let the target-independent code do all of the work.  The manual
scalarization was from a time before good target-independent support
for scalarization in LLVM. However, this forces us to specially-handle
vector loads and stores, which we can turn into PTX instructions that
produce/consume multiple operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 14:18:49 +00:00
Kostya Serebryany
f28e3211a6 [asan] fix tests for the new ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174959 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 11:14:24 +00:00
Bill Wendling
d7fdee493b Test for string attributes and for attribute group output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 09:14:20 +00:00
Arnold Schwaighofer
6851623c54 ARM cost model: Add vector reverse shuffle costs
A reverse shuffle is lowered to a vrev and possibly a vext instruction (quad
word).

radar://13171406

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 02:40:39 +00:00
Arnold Schwaighofer
d9316dacf5 ARM NEON: Handle v16i8 and v8i16 reverse shuffles
Lower reverse shuffles to a vrev64 and a vext instruction instead of the default
legalization of storing and loading to the stack. This is important because we
generate reverse shuffles in the loop vectorizer when we reverse store to an
array.

  uint8_t Arr[N];
  for (i = 0; i < N; ++i)
    Arr[N - i - 1] = ...

radar://13171760

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 01:58:32 +00:00
Chad Rosier
d556fd1290 [ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Part of rdar://12470373

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174926 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 01:00:01 +00:00
Michael Ilseman
9c213cc3c3 Optimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> bitcast X to ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:41:44 +00:00
Krzysztof Parzyszek
71490fa946 Extend Hexagon hardware loop generation to handle various additional cases:
- variety of compare instructions,
- loops with no preheader,
- arbitrary lower and upper bounds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:37:55 +00:00
Michael Ilseman
651fb490ae Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174903 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:36:49 +00:00
Kay Tiong Khoo
86494d7991 *fixed disassembly of some i386 system insts with intel syntax
*added file for test cases for i386 intel syntax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174900 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 19:46:36 +00:00
Justin Holewinski
ff5adad9f3 [NVPTX] Remove NoCapture from address space conversion intrinsics. NoCapture is not valid in this case, and was causing incorrect optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 18:56:35 +00:00
Tim Northover
511d285700 AArch64: generate dwarfdump test rather than include .o in subversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174891 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 16:28:12 +00:00
Tim Northover
b05dc55460 AArch64: Add basic relocation processing for llvm-dwarfdump.
This allows llvm-dwarfdump to handle the relocations needed, at least
for LLVM-produced code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 11:16:02 +00:00
Tim Northover
c37aa995e3 AArch64: Undo change to how test was run
This broke on Windows, presumably due to interleaving of output streams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 10:51:41 +00:00
Tim Northover
b516186386 Make use of DiagnosticType to provide better AArch64 diagnostics.
This gives a DiagnosticType to all AsmOperands in sight. This replaces all
"invalid operand" diagnostics with something more specific. The messages given
should still be sufficiently vague that they're not usually actively misleading
when LLVM guesses your instruction incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174871 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 09:29:37 +00:00
Bill Wendling
595ef3e314 FileCheck-ize the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 08:34:57 +00:00
Kostya Serebryany
ab39afa9d9 [tsan/msan] adding thread_safety and uninitialized_checks attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174864 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 08:13:54 +00:00
Andrew Trick
6050edfe3e LSR IVChain improvement.
Handle chains in which the same offset is used for both loads and
stores to the same array.

Fixes rdar://11410078.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174789 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 01:11:01 +00:00
Manman Ren
f2d89ff5c8 Dwarf: do not use line_table_start in at_stmt_list since we do not always emit
line table entries in assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09 00:41:44 +00:00
Reed Kotler
b2d1275188 Add the 16 bit version of addiu. To the assembler, the 16 and 32 bit are the
same so we put in the comment field an indicator when we think we are
emitting the 16 bit version. For the direct object emitter, the difference is 
important as well as for other passes which need an accurate count of 
program size. There will be other similar putbacks to this for various
instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:42:56 +00:00
Hal Finkel
089a5f8a8c DAGCombiner: Constant folding around pre-increment loads/stores
Previously, even when a pre-increment load or store was generated,
we often needed to keep a copy of the original base register for use
with other offsets. If all of these offsets are constants (including
the offset which was combined into the addressing mode), then this is
clearly unnecessary. This change adjusts these other offsets to use the
new incremented address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174746 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 21:35:47 +00:00
Bob Wilson
8f637adbd3 Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.
Aside from the question of whether we report a warning or an error when we
can't satisfy a requested stack object alignment, the current implementation
of this is not good.  We're not providing any source location in the diagnostics
and the current warning is not connected to any warning group so you can't
control it.  We could improve the source location somewhat, but we can do a
much better job if this check is implemented in the front-end, so let's do that
instead.  <rdar://problem/13127907>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174741 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 20:35:15 +00:00
Bill Schmidt
0f58dbae4a Refine fix to bug 15041.
Thanks to help from Nadav and Hal, I have a more reasonable (and even
correct!) approach.  This specifically penalizes the insertelement
and extractelement operations for the performance hit that will occur
on PowerPC processors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:19:17 +00:00
Chad Rosier
33daeab1bb [SimplifyLibCalls] Library call simplification doen't work if the call site
isn't using the default calling convention.  However, if the transformation is
from a call to inline IR, then the calling convention doesn't matter.
rdar://13157990

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:00:14 +00:00
Arnold Schwaighofer
fb55a8fd7c ARM cost model: Address computation in vector mem ops not free
Adds a function to target transform info to query for the cost of address
computation. The cost model analysis pass now also queries this interface.
The code in LoopVectorize adds the cost of address computation as part of the
memory instruction cost calculation. Only there, we know whether the instruction
will be scalarized or not.
Increase the penality for inserting in to D registers on swift. This becomes
necessary because we now always assume that address computation has a cost and
three is a closer value to the architecture.

radar://13097204

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174713 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 14:50:48 +00:00
Alexey Samsonov
f64edf8d80 Update tests for DWARF parser: store sources next to pre-built object files and provide build instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 14:34:33 +00:00
Reed Kotler
61b97b8c17 When Mips16 frames grow large, the immediate field may exceed the maximum
allowed size for the instruction. This code uses RegScavenger to fix this.
We sometimes need 2 registers for Mips16 so we must handle things
differently than how register scavenger is normally used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174696 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 03:57:41 +00:00
Andrew Trick
d2bcda7706 Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."
This reverts commit 3854a5d90f.

This causes a clang unit test to hang: vtable-available-externally.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 01:55:39 +00:00
Michael Ilseman
3854a5d90f Have InstCombine call SipmlifyCall when handling calls. Test case included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174675 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 23:01:35 +00:00
Akira Hatanaka
0c66403efd [mips] Add definition of JALR instruction which has two register operands. Change the
original JALR instruction with one register operand to be a pseudo-instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:48:00 +00:00
Michael Ilseman
f89de816ae Identify and simplify idempotent intrinsics. Test case included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174650 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 19:26:05 +00:00
Michael J. Spencer
def0c1f756 [Object][ELF] Fix crash on no dynamic section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174639 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 18:26:45 +00:00
Arnold Schwaighofer
66f535a273 ARM cost model: Add costs for vector selects
Vector selects are cheap on NEON. They get lowered to a vbsl instruction.

radar://13158753

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174631 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 16:10:15 +00:00
Tom Stellard
1234c9be42 R600: Add support for SET*_DX10 instructions
These instructions compare two floating point values and return an
integer true (-1) or false (0) value.

When compiling code generated by the Mesa GLSL frontend, the SET*_DX10
instructions save us four instructions for most branch decisions that
use floating-point comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 14:02:35 +00:00
Tom Stellard
2a77cf7f47 R600: Add tests for unsupported condition codes.
All of the le and lt variants are unsupported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 14:02:33 +00:00
Tom Stellard
b4409610a2 R600: Fix assembly name for SETGT_INT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174607 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 14:02:27 +00:00
Owen Anderson
55f067de09 Remove this testcase until I can figure out how to properly conditionalize it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174591 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 07:01:54 +00:00
Owen Anderson
54b8fa3bb7 Another attempt at getting the XFAIL line right for this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174588 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 06:26:55 +00:00
Reed Kotler
24b339dcdc Make sure we call externals from libraries properly when -static.
For example, when we are doing mips16 hard float or soft float.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174583 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 04:34:51 +00:00
Reed Kotler
6e3443eed4 Enable jumps when in -static mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174580 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 03:49:51 +00:00
Michael Ilseman
0fae64fde0 Preserve fast-math flags after reassociation and commutation. Update test cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174571 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 01:40:15 +00:00
Michael Ilseman
9f41a5c7fa whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 01:27:13 +00:00
Owen Anderson
1e8f6f4df1 Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 00:54:05 +00:00
Owen Anderson
42258e0ea8 Signficantly generalize our ability to constant fold floating point intrinsics, including ones on half types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 22:43:31 +00:00
Eli Bendersky
bfa18fdfbf Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 22:34:46 +00:00
Eli Bendersky
f91b23c8cd Add a comment to the test that points to the source from which the input object
file was generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 22:17:40 +00:00
Eli Bendersky
62b055fd50 Add a test for checking the current .debug_frame dumping capability.
The test is a binary placed in test/DebugInfo/Inputs, with a source C
file used for reference/reproducing. The source's first line is a clang
build command for reproducing the binary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174543 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:55:06 +00:00
Eli Bendersky
16221a60a0 This is a follow-up on r174446, now taking Atom processors into
account. Atoms use LEA for updating SP in prologs/epilogs, and the
exact LEA opcode depends on the data model.

Also reapplying the test case which was added and then reverted
(because of Atom failures), this time specifying explicitly the CPU in
addition to the triple. The test case now checks all variations (data
mode, cpu Atom vs. Core).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:43:57 +00:00
Guy Benyei
4cc74fcba0 Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174541 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:40:38 +00:00
Tim Northover
8a06229c89 Implement external weak (ELF) symbols on AArch64
Weakly defined symbols should evaluate to 0 if they're undefined at
link-time. This is impossible to do with the usual address generation
patterns, so we should use a literal pool entry to materlialise the
address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174518 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 16:43:33 +00:00
Tim Northover
cbff068398 Add AArch64 CRC32 instructions
These instructions are a late addition to the architecture, and may
yet end up behind an optional attribute, but for now they're available
at all times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174496 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 09:13:13 +00:00
Tim Northover
9e3b31345f Add icache prefetch operations to AArch64
This adds hints to the various "prfm" instructions so that they can
affect the instruction cache as well as the data cache.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174495 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 09:04:56 +00:00
Eli Bendersky
a859afa859 Remove this test in the meantime, since it won't pass on Atom. Atom uses lea
to move the stack pointer in prologs/epilogs. I will fix the test and add it
back later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174484 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 03:15:00 +00:00
Manman Ren
9c5861fdbd Attempt to recover gdb bot after r174445.
Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:59:41 +00:00
Eli Bendersky
61b057a6fd Test for r174446
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 23:31:48 +00:00
Manman Ren
43213cf1ac Dwarf: support for LTO where a single object file can have multiple line tables
We generate one line table for each compilation unit in the object file.
Reviewed by Eric and Kevin.

rdar://problem/13067005


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174445 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:52:47 +00:00
Akira Hatanaka
baabdecbb9 [mips] Do not use function CC_MipsN_VarArg unless the function being analyzed
is a vararg function.

The original code was examining flag OutputArg::IsFixed to determine whether
CC_MipsN_VarArg or CC_MipsN should be called. This is not correct, since this
flag is often set to false when the function being analyzed is a non-variadic
function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174442 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:18:11 +00:00
Benjamin Kramer
39b5f12dd6 InstCombine: Fix and simplify the inttoptr side too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 20:22:40 +00:00
Michael Gottesman
07b884af25 Added missing newline to end of test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 19:39:44 +00:00
Owen Anderson
b48783b091 Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load.  This caused infinite loops in DAG combine with the
original application of this patch.

ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 19:24:39 +00:00
Benjamin Kramer
1018fa256d InstCombine: Harden code to work with vectors of pointers and simplify it a bit.
Found by running instcombine on a fabricated test case for the constant folder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 19:21:56 +00:00
Jyotsna Verma
1d3d2c57f5 Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 19:20:45 +00:00
Benjamin Kramer
faf601ee93 ConstantFolding: Fix a crash when encoutering a truncating inttoptr.
This was introduced in r173293.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 19:04:36 +00:00
Jyotsna Verma
f2c4db97e1 Hexagon: Add testcase for post-increment store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:23:51 +00:00
Chad Rosier
1e45487dfd [SjLj Prepare] When demoting an invoke instructions to the stack, if the normal
edge is critical, then split it so we can insert the store.
rdar://13126179

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:23:10 +00:00
Jyotsna Verma
691c365aad Hexagon: Use multiclass for absolute addressing mode stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174412 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:15:34 +00:00
Jakob Stoklund Olesen
7088fb60ed Add a test case for PR14750.
This was fixed by r174402.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174405 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:04:15 +00:00
Derek Schuff
f918d7fd73 [MC] Bundle alignment: Invalidate relaxed fragments
Currently, when a fragment is relaxed, its size is modified, but its
offset is not (it gets laid out as a side effect of checking whether
it needs relaxation), then all subsequent fragments are invalidated
because their offsets need to change. When bundling is enabled,
relaxed fragments need to get laid out again, because the increase in
size may push it over a bundle boundary. So instead of only
invalidating subsequent fragments, also invalidate the fragment that
gets relaxed, which causes it to get laid out again.

This patch also fixes some trailing whitespace and fixes the
bundling-related debug output of MCFragments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174401 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 17:55:27 +00:00
Tom Stellard
ebc535bc4a R600: Add tests for instruction predicates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174393 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 17:09:13 +00:00
Tom Stellard
3ce2ec8478 R600: Emit function name in the AsmPrinter
Emitting the function name allows us to check for it in the FileCheck
tests so we can make sure FileCheck is checking the output of the
correct function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174392 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 17:09:11 +00:00
Jyotsna Verma
4210da7253 Hexagon: Add V4 compare instructions. Enable relationship mapping
for the existing instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174389 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 16:42:24 +00:00
NAKAMURA Takumi
f5b39cd8de Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 15:32:16 +00:00
NAKAMURA Takumi
eec44ce834 llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll: "-debug" requires +Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174379 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 15:32:10 +00:00
Arnold Schwaighofer
935645b765 Loop Vectorizer: Handle pointer stores/loads in getWidestType()
In the loop vectorizer cost model, we used to ignore stores/loads of a pointer
type when computing the widest type within a loop. This meant that if we had
only stores/loads of pointers in a loop we would return a widest type of 8bits
(instead of 32 or 64 bit) and therefore a vector factor that was too big.

Now, if we see a consecutive store/load of pointers we use the size of a pointer
(from data layout).

This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced
test case is the first test in vector_ptr_load_store.ll).

radar://13139343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 15:08:02 +00:00
NAKAMURA Takumi
eb260b2527 Revert r174343, "When the target-independent DAGCombiner inferred a higher alignment for a load,"
It caused hangups in compiling clang/lib/Parse/ParseDecl.cpp and clang/lib/Driver/Tools.cpp in stage2 on some hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174374 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 14:44:16 +00:00
Logan Chien
b0c899666a Link .ARM.exidx with corresponding text section.
The sh_link in the ELF section header of .ARM.exidx should
be filled with the section index of the corresponding text
section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 14:18:59 +00:00
Arnold Schwaighofer
e2d5590c33 ARM cost model: Cost for scalar integer casts and floating point conversions
Also adds some costs for vector integer float conversions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174371 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 14:05:55 +00:00
Jack Carter
7304702ef9 This patch that sets the Mips ELF header flag for
MicroMips architectures. 

Contributer: Zoran Jovanovic
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 09:30:03 +00:00
Jack Carter
37ef65b9c1 This patch that sets the EmitAlias flag in td files
and enables the instruction printer to print aliased 
instructions. 

Due to usage of RegisterOperands a change in common 
code (utils/TableGen/AsmWriterEmitter.cpp) is required 
to get the correct register value if it is a RegisterOperand.

Contributer: Vladimir Medic
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 08:32:10 +00:00
Eric Christopher
19c3364728 Add support for testing the output of the abbrev table for the
skeleton CU as part of the DWARF5 split dwarf proposal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 07:32:00 +00:00
Eric Christopher
208cc6f489 Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 07:31:55 +00:00
Michael Gottesman
e1b6b52903 Add code to GlobalVariable.h so that global variables marked as
externally_initialized return false for hasDefiniteInitializer and
hasUniqueInitializer.

rdar://12580965.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 06:53:26 +00:00
Owen Anderson
429f7ef0c1 When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 06:25:30 +00:00
Michael Gottesman
a2de37c897 Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174340 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 05:57:38 +00:00
Manman Ren
91b978e157 [Stack Alignment] emit warning instead of a hard error
Per discussion in rdar://13127907, we should emit a hard error only if
people write code where the requested alignment is larger than achievable
and assumes the low bits are zeros. A warning should be good enough when
we are not sure if the source code assumes the low bits are zeros.

rdar://13127907


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 23:45:08 +00:00
Jyotsna Verma
3e1635d08c Hexagon: Add V4 combine instructions and some more Def Pats for V2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 15:52:56 +00:00
Benjamin Kramer
0d3731478e Disable a couple more vector splat optimizations on PPC.
I didn't see those because the test case used "not grep". FileCheck the test and
XFAIL it, preserving the old optimization, so this can be fixed eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174330 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 15:52:32 +00:00
Benjamin Kramer
a220aeb58f X86: Open up some opportunities for constant folding by postponing shift lowering.
Fixes PR15141.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174327 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 15:19:33 +00:00
Benjamin Kramer
4969310052 SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following:
input:
x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16>
lowered to:
tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8>
x = ADD tmp, tmp

The add now gets folded immediately and we're back at the BUILD_VECTOR we
started from. I don't see a way to fix this currently so I left it disabled
for now.

Fix some trivially foldable X86 tests too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 15:19:18 +00:00
Tim Northover
4f12e53f4a Update debugging test for change in expected metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174321 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 12:15:00 +00:00
David Blaikie
f839eed5ea [DebugInfo] remove more node indirection (this time from the subprogram's variable lists)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 05:56:36 +00:00
Arnold Schwaighofer
a7ad84851b ARM cost model: Penalize insertelement into D subregisters
Swift has a renaming dependency if we load into D subregisters. We don't have a
way of distinguishing between insertelement operations of values from loads and
other values. Therefore, we are pessimistic for now (The performance problem
showed up in example 14 of gcc-loops).

radar://13096933

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174300 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 02:52:05 +00:00
David Blaikie
a8eefc7cc7 Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174266 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 05:56:24 +00:00
Reed Kotler
63f3312355 Start static relocation implementation for mips16.
This checkin makes hello world work. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174264 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 04:07:35 +00:00
Manman Ren
a0bbe40380 Removing ssp and uwtable from the testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174259 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 01:34:38 +00:00
Shuxin Yang
98b93e5a94 rdar://13126763
Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression
"x + x*x" into "x * 3.0".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 00:22:03 +00:00
Manman Ren
945e828003 [Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 23:54:37 +00:00
Bill Schmidt
cdc3b74cfb LLVM enablement for some older PowerPC CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174230 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 22:59:51 +00:00
Dan Gohman
03fce7074e Add a testcase for some past-the-end address subtleties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174210 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 19:37:52 +00:00
David Sehr
693c37aa86 Two changes relevant to LEA and x32:
1) allows the use of RIP-relative addressing in 32-bit LEA instructions under
   x86-64 (ILP32 and LP64)
2) separates the size of address registers in 64-bit LEA instructions from
   control by ILP32/LP64.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174208 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 19:28:09 +00:00
Jyotsna Verma
03b3771c6c Hexagon: Test case to confirm generation of indexed loads with zero offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 16:40:06 +00:00
Benjamin Kramer
d9f32c20da InstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers too.
Prepare it for vectors of pointers and handle simple cases. We don't handle
complicated cases because accumulateConstantOffset bails on pointer vectors.
Fixes selfhost on i386.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 15:21:10 +00:00
Tim Northover
7bc8414ee9 Add explicit triples to AArch64 tests
Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174170 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 11:40:47 +00:00
Nadav Rotem
36146afb96 Revert r174152. The shift amount may overflow and in that case this transformation is illegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174156 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 07:59:33 +00:00
Nadav Rotem
d5eb1cbee5 Optimize shift lefts of a constant by a value plus constant into a single shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174152 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 06:45:40 +00:00
Dan Gohman
fdd1eafe86 Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174122 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 00:11:13 +00:00
Dan Gohman
ac08785eda An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174119 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:49:33 +00:00
Bill Wendling
169d527075 Remove the AttrBuilder form of the Attribute::get creators.
The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174110 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:16:25 +00:00
Tom Stellard
4bdf9890ed R600: Fold clamp, neg, abs
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174099 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 22:11:54 +00:00
Manman Ren
16d1a6bf08 Linker: correctly link in dbg.declare
This is a re-worked version of r174048.
Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate 
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

rdar://problem/13089880


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 21:19:18 +00:00
Lang Hames
2d95e43fd8 When lowering memcpys to loads and stores, make sure we don't promote alignments
past the natural stack alignment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 20:23:43 +00:00
Derek Schuff
b11917c1aa [MC] bundle alignment: prevent padding instructions from crossing bundle boundaries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 17:00:03 +00:00
Tim Northover
72062f5744 Add AArch64 as an experimental target.
This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 12:12:40 +00:00
Pekka Jaaskelainen
d72b4d321e Made the min-trip-count-switch test X86-specific to avoid
breakage with builds without X86-support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174052 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 10:33:22 +00:00
Alexey Samsonov
e22df330a3 Revert r173946. This breaks compilation of googletest with Clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174048 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 08:02:11 +00:00
Michael Gottesman
67dad63de6 Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 01:04:23 +00:00
Eric Christopher
a9bd4b4647 Check and allow floating point registers to select the size of the
register for inline asm. This conforms to how gcc allows for effective
casting of inputs into gprs (fprs is already handled).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174008 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:50:46 +00:00
Eli Bendersky
2acfb179fc Replace some more greps with FileChecks in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:44:12 +00:00
Eli Bendersky
ee1841cdda Rewrite this test properly with a FileCheck instead of greps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:11:52 +00:00
Dan Gohman
d363ae5299 Fix ConstantFold's folding of icmp instructions to recognize that,
for example, a one-past-the-end pointer from one global variable may
be equal to the base pointer of another global variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:01:45 +00:00
Hal Finkel
9a79b320cb PPC QPX requires a 32-byte aligned stack
On systems which support the QPX vector instructions, the stack must be
32-byte aligned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173993 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 23:43:27 +00:00
Evan Cheng
b25a645830 Forgot the test case before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 22:57:00 +00:00