Akira Hatanaka [Sat, 13 Apr 2013 02:13:30 +0000 (02:13 +0000)]
[mips] Move MipsTargetLowering::lowerINTRINSIC_W_CHAIN and
lowerINTRINSIC_WO_CHAIN into MipsSETargetLowering.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179444
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Apr 2013 01:55:34 +0000 (01:55 +0000)]
Some versions of gcc don't like typenames in these places.
Should fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179441
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Apr 2013 01:45:40 +0000 (01:45 +0000)]
Finish templating MachObjectFile over endianness.
We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 13 Apr 2013 00:55:41 +0000 (00:55 +0000)]
[mips] Reapply r179420 and r179421.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179434
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 13 Apr 2013 00:45:02 +0000 (00:45 +0000)]
[mips] Override TargetLoweringBase::isShuffleMaskLegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 23:03:20 +0000 (23:03 +0000)]
[ms-inline asm] Simplify the logic by using parsePrimaryExpr. No functional
change intended. Test case previously added in r178568.
Part of rdar://
13611297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179425
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:40:07 +0000 (22:40 +0000)]
Revert r179420 and r179421.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179422
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:24:52 +0000 (22:24 +0000)]
[mips] Instruction selection patterns for carry-setting and using add
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179421
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Apr 2013 22:14:24 +0000 (22:14 +0000)]
[mips] v4i8 and v2i16 add, sub and mul instruction selection patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179420
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 22:02:26 +0000 (22:02 +0000)]
Revert r179409 because it caused some warnings and some of the build bots fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179418
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Apr 2013 21:56:23 +0000 (21:56 +0000)]
InstCombine: Check the operand types before merging fcmp ord & fcmp ord.
Fixes PR15737.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179417
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:16:54 +0000 (21:16 +0000)]
SLPVectorizer: add support for vectorization of diamond shaped trees. We now perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179414
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:15:03 +0000 (21:15 +0000)]
CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179413
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 21:11:14 +0000 (21:11 +0000)]
Add debug prints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179412
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 20:45:20 +0000 (20:45 +0000)]
Add support for additional vector instructions in the interpreter.
patch by Veselov, Yuri <Yuri.Veselov@intel.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 20:20:54 +0000 (20:20 +0000)]
[ms-inline asm] Move this logic into a static function as it's only applicable
when parsing MS-style inline assembly. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 19:51:49 +0000 (19:51 +0000)]
[ms-inline asm] Address the FIXME for ImmDisp before brackets. This
is a follow on to r179393 and r179399. Test case to be added on
the clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179403
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 12 Apr 2013 19:09:09 +0000 (19:09 +0000)]
lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179402
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 12 Apr 2013 19:08:57 +0000 (19:08 +0000)]
lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 18:54:20 +0000 (18:54 +0000)]
[ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
is a follow on to r179393. Test case to be added on the clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179399
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 12 Apr 2013 18:47:25 +0000 (18:47 +0000)]
ARM: Correct printing of pre-indexed operands.
According to the ARM reference manual, constant offsets are mandatory for pre-indexed addressing modes.
The MC disassembler was not obeying this when the offset is 0.
It was producing instructions like: str r0, [r1]!.
Correct syntax is: str r0, [r1, #0]!.
This change modifies the dumping of operands so that the offset is always printed, regardless of its value, when pre-indexed addressing mode is used.
Patch by Mihail Popa <Mihail.Popa@arm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179398
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 18:21:18 +0000 (18:21 +0000)]
[ms-inline asm] Add support for operands that include both a symbol and an
immediate displacement. Specifically, add support for generating the proper IR.
We've been able to parse this for some time now. Test case to be added on the
clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179393
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 12 Apr 2013 18:17:57 +0000 (18:17 +0000)]
PPC: Remove (broken) nested implicit definition lists
TableGen will not combine nested list 'let' bindings into a single list, and
instead uses only the inner scope. As a result, several instruction definitions
were missing implicit register defs that were in outer scopes. This de-nests
these scopes and makes all instructions have only one let binding which sets
implicit register definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179392
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 12 Apr 2013 18:17:38 +0000 (18:17 +0000)]
Add a comment about the PPC Interpretation64Bit bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179391
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 12 Apr 2013 18:01:06 +0000 (18:01 +0000)]
Hexagon: Set isPredicatedNew flag on predicate new instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179388
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 12 Apr 2013 17:46:52 +0000 (17:46 +0000)]
Hexagon: Set isPredicatedFlase flag for all the instructions with negated predication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179387
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 12 Apr 2013 17:25:07 +0000 (17:25 +0000)]
Simplify (A & ~B) in icmp if A is a power of 2
The transform will execute like so:
(A & ~B) == 0 --> (A & B) != 0
(A & ~B) != 0 --> (A & B) == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Apr 2013 16:26:42 +0000 (16:26 +0000)]
[ms-inline asm] Add the implementation for the AOK_Delete kind, which was added
in r179325. Test case coming shortly on the clang side.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179383
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Apr 2013 15:15:19 +0000 (15:15 +0000)]
LoopVectorizer: integer division is not a reduction operation
Don't classify idiv/udiv as a reduction operation. Integer division is lossy.
For example : (1 / 2) * 4 != 4/2.
Example:
int a[] = { 2, 5, 2, 2}
int x = 80;
for()
x /= a[i];
Scalar:
x /= 2 // = 40
x /= 5 // = 8
x /= 2 // = 4
x /= 2 // = 2
Vectorized:
<80, 1> / <2,5> //= <40,0>
<40, 0> / <2,2> //= <20,0>
20*0 = 0
radar://
13640654
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179381
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 12 Apr 2013 12:54:58 +0000 (12:54 +0000)]
AArch64: use full triple for ELF tests
These tests rely specifically on the names of ELF relocations, let alone any
other detail. There's no way they'd work if LLVM was emitting something else by
default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179376
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 12 Apr 2013 12:54:49 +0000 (12:54 +0000)]
AArch64: remove over-zealous use of CHECK-NEXT
It turns out some platforms (e.g. Windows) lay out their llvm-mc slightly
differently with extra newlines; there was no real reason for the test lines to
be consecutive, so this relaxes the FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179375
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Apr 2013 12:13:51 +0000 (12:13 +0000)]
Revert broken pieces of r179373.
You can't copy an OwningPtr, and move semantics aren't available in C++98.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179374
91177308-0d34-0410-b5e6-
96231b3b80d8
Andy Gibbs [Fri, 12 Apr 2013 10:56:28 +0000 (10:56 +0000)]
Replace uses of the deprecated std::auto_ptr with OwningPtr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179373
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Apr 2013 08:33:11 +0000 (08:33 +0000)]
Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong answers for blocks larger than 3 instrs.
Also add a unit test. PR15727.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179370
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 12 Apr 2013 07:18:55 +0000 (07:18 +0000)]
Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the driver
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179367
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:07:39 +0000 (04:07 +0000)]
Teach llvm-readobj to print ELF program headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179363
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:07:13 +0000 (04:07 +0000)]
Remove obsolete object file dumpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179362
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:06:46 +0000 (04:06 +0000)]
Replace coff-/elf-dump with llvm-readobj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:02:23 +0000 (04:02 +0000)]
Add extensive relocation tests for llvm-readobj
This test ensures that relocation type names returned by libObject match
the raw relocation type value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179360
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:01:52 +0000 (04:01 +0000)]
Add -expand-relocs to llvm-readobj
This option expands shown relocations from single line to a dictionary
format:
Relocation {
Offset: 0x4
Type: R_386_32 (1)
Symbol: sym
Info: 0x0
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179359
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 04:01:28 +0000 (04:01 +0000)]
Add missing relocation names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179358
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Fri, 12 Apr 2013 03:59:28 +0000 (03:59 +0000)]
Support MIPS64EL relocation type names
MIPS64EL relocation entries have up to three relocation operations. Because
libObject only exposes a single relocation name, use the concatenation of
the individual relocation type names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179357
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 12 Apr 2013 02:18:09 +0000 (02:18 +0000)]
Add PPC instruction record forms and associated query functions
This is prep. work for the implementation of optimizeCompare. Many PPC
instructions have 'record' forms (in almost all cases, this means that the RC
bit is set) that cause the result of the instruction to be compared with zero,
and the result of that comparison saved in a predefined condition register. In
order to add the record forms of the instructions without too much
copy-and-paste, the relevant functions have been refactored into multiclasses
which define both the record and normal forms.
Also, two TableGen-generated mapping functions have been added which allow
querying the instruction code for the record form given the normal form (and
vice versa).
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179356
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 01:24:16 +0000 (01:24 +0000)]
Don't disable block layout when forcing block alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179355
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 01:07:16 +0000 (01:07 +0000)]
Fix the test on linux by setting the triple and the align format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179354
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Apr 2013 00:48:32 +0000 (00:48 +0000)]
Add a flag to align all basic blocks in the function.
When debugging performance regressions we often ask ourselves if the regression
that we see is due to poor isel/sched/ra or due to some micro-architetural
problem. When comparing two code sequences one good way to rule out front-end
bottlenecks (and other the issues) is to force code alignment. This pass adds
a flag that forces the alignment of all of the basic blocks in the program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179353
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Apr 2013 00:17:33 +0000 (00:17 +0000)]
Add 179294 back, but don't use bit fields so that it works on big endian hosts.
Original message:
Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.
It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179345
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Apr 2013 23:57:04 +0000 (23:57 +0000)]
[ms-inline asm] Add support for using the LENGTH, TYPE, and SIZE operators with
variables that use namespace alias qualifiers. Test case coming on clang side
shortly.
Part of rdar://
13499009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179343
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Apr 2013 23:37:34 +0000 (23:37 +0000)]
[ms-inline asm] Add support for using offsetof operator with variables that use
namespace alias qualifiers. Test case coming on clang side shortly.
Part of rdar://
13499009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179339
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 11 Apr 2013 23:24:18 +0000 (23:24 +0000)]
Aliasing rules for struct-path aware TBAA.
Added PathAliases to check if two struct-path tags can alias.
Added command line option -struct-path-tbaa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179337
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Apr 2013 23:24:15 +0000 (23:24 +0000)]
[ms-inline asm] Pass a StringRef reference to ParseIntelVarWithQualifier so we
can build up the identifier string. No test case as support for looking up
these type of identifiers hasn't been implemented on the clang side.
Part of rdar://
13499009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179336
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 11 Apr 2013 22:51:30 +0000 (22:51 +0000)]
TBAA: add utility to create a TBAA scalar type node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Apr 2013 22:00:03 +0000 (22:00 +0000)]
[ms-inline asm] Add a new AsmRewriteKind, AOK_Delete. To be used in a future
commit.
Part of rdar://
13453209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179325
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Apr 2013 21:49:30 +0000 (21:49 +0000)]
[ms-inline asm] Remove brackets from around a symbol reference in the target
specific logic. This makes the code much less fragile. Test case coming on the
clang side in a moment.
rdar://
13634327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179323
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 11 Apr 2013 21:39:01 +0000 (21:39 +0000)]
Use FileCheck instead of grep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179322
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 11 Apr 2013 20:13:52 +0000 (20:13 +0000)]
Fix undefined behavior in AArch64
A64Imms::isLogicalImmBits and A64Imms::isLogicalImm will attempt to
execute shifts that perform undefined behavior. Instead of attempting
to perform the 64-bit rotation, treat it as a no-op.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179317
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 11 Apr 2013 20:05:46 +0000 (20:05 +0000)]
Optimize icmp involving addition better
Allows LLVM to optimize sequences like the following:
%add = add nsw i32 %x, 1
%cmp = icmp sgt i32 %add, %y
into:
%cmp = icmp sge i32 %x, %y
as well as:
%add1 = add nsw i32 %x, 20
%add2 = add nsw i32 %y, 57
%cmp = icmp sge i32 %add1, %add2
into:
%add = add nsw i32 %y, 37
%cmp = icmp sle i32 %cmp, %x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179316
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 11 Apr 2013 19:39:19 +0000 (19:39 +0000)]
Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179315
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 11 Apr 2013 19:29:26 +0000 (19:29 +0000)]
[mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
multiply instructions in MipsSEDAGToDAGISel.
This patch was supposed to be part of r178403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179314
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 11 Apr 2013 19:07:14 +0000 (19:07 +0000)]
[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
- Rename function.
- Pass iterator by value.
- Remove header include.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179312
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 17:46:10 +0000 (17:46 +0000)]
Revert my last two commits while I debug what is wrong in a big endian host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179303
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 17:23:23 +0000 (17:23 +0000)]
Fix llvm-readobj tests on big endian hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179298
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 16:31:37 +0000 (16:31 +0000)]
Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.
It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179294
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Apr 2013 15:10:09 +0000 (15:10 +0000)]
Fix for wrong instcombine on vector insert/extract
When trying to collapse sequences of insertelement/extractelement
instructions into single shuffle instructions, there is one specific
case where the Instruction Combiner wrongly updates the resulting
Mask of shuffle indexes.
The problem is in function CollectShuffleElments.
If we have a sequence of insert/extract element instructions
like the one below:
%tmp1 = extractelement <4 x float> %LHS, i32 0
%tmp2 = insertelement <4 x float> %RHS, float %tmp1, i32 1
%tmp3 = extractelement <4 x float> %RHS, i32 2
%tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 3
Where:
. %RHS will have a mask of [4,5,6,7]
. %LHS will have a mask of [0,1,2,3]
The Mask of shuffle indexes is wrongly computed to [4,1,6,7]
instead of [4,0,6,7].
When analyzing %tmp2 in order to compute the Mask for the
resulting shuffle instruction, the algorithm forgets to update
the mask index at position 1 with the index associated to the
element extracted from %LHS by instruction %tmp1.
Patch by Andrea DiBiagio!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179291
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 11 Apr 2013 14:43:19 +0000 (14:43 +0000)]
Add a CHECK-NOT for a more faithful translation of the original grep | count 2.
Thanks to Reid Kleckner for catching this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179289
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 14:06:34 +0000 (14:06 +0000)]
Add a function to check if an argument list is too long.
This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.
Patch by Nathan Froyd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179285
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 11 Apr 2013 13:20:00 +0000 (13:20 +0000)]
[ASan] Allow disabling init-order checks for globals by source file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179280
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Thu, 11 Apr 2013 13:15:39 +0000 (13:15 +0000)]
Add myself in the CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179279
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Apr 2013 12:41:41 +0000 (12:41 +0000)]
Add missing colons to check lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179277
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Apr 2013 12:32:23 +0000 (12:32 +0000)]
FileCheckize a bunch of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179276
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Apr 2013 11:57:01 +0000 (11:57 +0000)]
Add braces around || in && to pacify GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179275
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Apr 2013 11:36:36 +0000 (11:36 +0000)]
Rename the C function to create a SLPVectorizerPass to something sane and expose it in the header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179272
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 11 Apr 2013 05:15:54 +0000 (05:15 +0000)]
Optimize vector select from all 0s or all 1s
As packed comparisons in AVX/SSE produce all 0s or all 1s in each SIMD lane,
vector select could be simplified to AND/OR or removed if one or both values
being selected is all 0s or all 1s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179267
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 11 Apr 2013 04:52:28 +0000 (04:52 +0000)]
Add CLAC/STAC instruction encoding/decoding support
As these two instructions in AVX extension are privileged instructions for
special purpose, it's only expected to be used in inlined assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179266
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 11 Apr 2013 04:43:09 +0000 (04:43 +0000)]
Enhance bool simplifcation in X86 to handle more cases
This patch is revised based on patch from Victor Umansky
<victor.umansky@intel.com>. More cases are handled in X86's bool
simplification, i.e.
- SETCC_CARRY
- value is truncated to i1 with AND
As a by-product, PR5443 is also fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179265
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Apr 2013 04:16:27 +0000 (04:16 +0000)]
R600ControlFlowFinalizer.cpp: Fix a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179263
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Apr 2013 04:16:22 +0000 (04:16 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179262
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 03:34:37 +0000 (03:34 +0000)]
Simplify the code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179259
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 02:52:29 +0000 (02:52 +0000)]
Add MachO-x86-64 tests.
The object was already checked in, but was not being tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179256
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 11 Apr 2013 02:21:31 +0000 (02:21 +0000)]
Fix MachO's getRelocationAdditionalInfo.
It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179255
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 11 Apr 2013 01:23:34 +0000 (01:23 +0000)]
Make PPCInstrInfo::isPredicated always return false
Because of how predication in implemented on PPC (only for branches), I think
that this is the right thing to do. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179252
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Apr 2013 00:31:35 +0000 (00:31 +0000)]
lit: Don't descend into .git directories during test discovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179249
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Apr 2013 00:31:27 +0000 (00:31 +0000)]
lit: Shorten a metavar to make --help look nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179248
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Apr 2013 00:31:22 +0000 (00:31 +0000)]
lit: Add a test for discovery when exact test names are given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179247
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Thu, 11 Apr 2013 00:05:57 +0000 (00:05 +0000)]
Add man page for llvm-readobj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179244
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Apr 2013 00:05:37 +0000 (00:05 +0000)]
lit: Add a trivial test of the basic progress bar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179243
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 10 Apr 2013 23:30:20 +0000 (23:30 +0000)]
Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179241
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Wed, 10 Apr 2013 23:28:17 +0000 (23:28 +0000)]
MC: Support COFF image-relative MCSymbolRefs
Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.
Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).
A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179240
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Wed, 10 Apr 2013 23:21:26 +0000 (23:21 +0000)]
Delete the functions F1 and F2 to appease the valgrind bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179239
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 10 Apr 2013 22:05:25 +0000 (22:05 +0000)]
Manually remove successors in if conversion when CopyAndPredicateBlock is used
In the simple and triangle if-conversion cases, when CopyAndPredicateBlock is
used because the to-be-predicated block has other predecessors, we need to
explicitly remove the old copied block from the successors list. Normally if
conversion relies on TII->AnalyzeBranch combined with BB->CorrectExtraCFGEdges
to cleanup the successors list, but if the predicated block contained an
un-analyzable branch (such as a now-predicated return), then this will fail.
These extra successors were causing a problem on PPC because it was causing
later passes (such as PPCEarlyReturm) to leave dead return-only basic blocks in
the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179227
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 10 Apr 2013 22:03:59 +0000 (22:03 +0000)]
No need to have this return a bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179226
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 10 Apr 2013 22:02:32 +0000 (22:02 +0000)]
Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179225
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 10 Apr 2013 21:56:52 +0000 (21:56 +0000)]
Move info to CREDITS.TXT file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179224
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Wed, 10 Apr 2013 21:52:25 +0000 (21:52 +0000)]
fixed xsave, xsaveopt, xrstor mnemonics with intel syntax; added test cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179223
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 10 Apr 2013 21:45:07 +0000 (21:45 +0000)]
Revert "Update the version of dwarf we say we're emitting to at least 3."
temporarily while we work on plumbing through some changes to continue
supporting gdb on darwin.
This reverts commit r179122.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179222
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 10 Apr 2013 21:42:06 +0000 (21:42 +0000)]
Track the compact unwind encoding for when we are unable to generate compact unwind information.
Compact unwind has an encoding for when we're not able to generate compact
unwind and must generate an EH frame instead. Track that, but still emit that CU
encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179220
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Wed, 10 Apr 2013 21:17:58 +0000 (21:17 +0000)]
fixed to disassemble with tab after mnemonic rather than space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179215
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 10 Apr 2013 20:50:44 +0000 (20:50 +0000)]
Use a real union for IdentifyingPassPtr.
This avoids a nasty const correctness issue (AnalysisIDs are const, Pass* isn't).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179213
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 10 Apr 2013 20:13:28 +0000 (20:13 +0000)]
Marking myself as release manager.
If anyone objects please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179212
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Wed, 10 Apr 2013 20:11:59 +0000 (20:11 +0000)]
In the X86 back end, getMemoryOperandNo() returns the offset
into the operand array of the start of the memory reference descriptor.
Additional code in EncodeInstruction provides an additional adjustment.
This patch places that additional code in a separate function,
called getOperandBias, so that any caller of getMemoryOperandNo
can also call getOperandBias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179211
91177308-0d34-0410-b5e6-
96231b3b80d8