Matt Arsenault [Fri, 1 Aug 2014 17:00:27 +0000 (17:00 +0000)]
Make getNamedOperandIdx readonly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214524
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 1 Aug 2014 17:00:26 +0000 (17:00 +0000)]
R600/SI: Don't display GDS bit for read2
This isn't displayed for any other instructions anymore,
and isn't ever used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214523
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Aug 2014 15:30:41 +0000 (15:30 +0000)]
[AArch64] Fix test from r214518 in an attempt to appease buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214521
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 1 Aug 2014 14:57:05 +0000 (14:57 +0000)]
Remove lto_codegen_set_attr.
It was never exported, so no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214519
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Aug 2014 14:48:56 +0000 (14:48 +0000)]
[AArch64] Generate tbz/tbnz when comparing against zero.
The tbz/tbnz checks the sign bit to convert
op w1, w1, w10
cmp w1, #0
b.lt .LBB0_0
to
op w1, w1, w10
tbnz w1, #31, .LBB0_0
Differential Revision: http://reviews.llvm.org/D4440
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214518
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 1 Aug 2014 14:35:58 +0000 (14:35 +0000)]
[PowerPC] PR20280 - Slots for byval parameters are not immutable
Found by inspection while looking at PR20280: code would mark slots
in the parameter save area where a byval parameter is passed as
"immutable". This is not correct since code is allowed to modify
byval parameters in place in the parameter save area.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214517
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 1 Aug 2014 14:31:55 +0000 (14:31 +0000)]
Remove some calls to std::move.
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get
a reference to it.
Thanks to David Blaikie for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214516
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 1 Aug 2014 14:16:40 +0000 (14:16 +0000)]
[pr20127] Check for leading \1 in the Twine version of getNameWithPrefix.
No functionality change, but will simplify an upcoming patch that uses the
Twine version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214515
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 1 Aug 2014 14:11:14 +0000 (14:11 +0000)]
Simplify the code a bit with std::unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214514
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 1 Aug 2014 13:07:19 +0000 (13:07 +0000)]
llvm-objdump: implement printing for MachO __compact_unwind info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214509
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 1 Aug 2014 12:42:11 +0000 (12:42 +0000)]
Allow only disassembling of M-class MSR masks that the assembler knows how to assemble back.
Note: The current code in DecodeMSRMask() rejects the unpredictable A/R MSR mask '0000' with Fail. The code in the patch follows this style and rejects unpredictable M-class MSR masks also with Fail (instead of SoftFail). If SoftFail is preferred in this case then additional changes to ARMInstPrinter (to print non-symbolic masks) and ARMAsmParser (to parse non-symbolic masks) will be needed.
Patch by Petr Pavlu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214505
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 1 Aug 2014 12:34:58 +0000 (12:34 +0000)]
Improve some const-correctness to remove a -Wcast-qual warning. No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214503
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 1 Aug 2014 12:08:04 +0000 (12:08 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM LDRB/LDRSB instructions.
The ARM ARM prohibits LDRB/LDRSB instructions with writeback into the destination register. With this commit this constraint is now enforced and we stop assembling LDRH/LDRSH instructions with unpredictable behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214500
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 1 Aug 2014 11:33:47 +0000 (11:33 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM LDRH/LDRSH instructions.
The ARM ARM prohibits LDRH/LDRSH instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling LDRH/LDRSH instructions with unpredictable behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214499
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 1 Aug 2014 11:08:51 +0000 (11:08 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM LDR instructions.
The ARM ARM prohibits LDR instructions with writeback into the destination register. With this commit this constraint is now enforced and we stop assembling LDR instructions with unpredictable behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214498
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 1 Aug 2014 09:47:38 +0000 (09:47 +0000)]
SLPVectorizer: fix build problem in Release configuration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214496
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 1 Aug 2014 09:20:42 +0000 (09:20 +0000)]
SLPVectorizer: improved scheduling algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214494
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 1 Aug 2014 09:17:39 +0000 (09:17 +0000)]
[mips][PR19612] Fix va_arg for big-endian mode.
Summary:
Big-endian mode was not correctly adjusting the offset for types smaller
than an ABI slot.
Fixes PR19612
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: sstankovic, llvm-commits
Differential Revision: http://reviews.llvm.org/D4556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214493
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 1 Aug 2014 08:14:28 +0000 (08:14 +0000)]
SLP Vectorizer: added statistics counter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214487
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 1 Aug 2014 08:05:55 +0000 (08:05 +0000)]
SLP Vectorizer: improve canonicalize tree operands of commutitive binary operands.
This reverts r214338 (except the test file) and replaces it with a more general algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214485
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Fri, 1 Aug 2014 06:16:03 +0000 (06:16 +0000)]
Revert of 214418:
"Create a default symver on Linux like ELF OSes."
Fails the build under Debian with ld.gold:
/usr/bin/ld.gold: --default-symver: unknown option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214482
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 1 Aug 2014 05:20:41 +0000 (05:20 +0000)]
[PowerPC] Generate unaligned vector loads using intrinsics instead of regular loads
Altivec vector loads on PowerPC have an interesting property: They always load
from an aligned address (by rounding down the address actually provided if
necessary). In order to generate an actual unaligned load, you can generate two
load instructions, one with the original address, one offset by one vector
length, and use a special permutation to extract the bytes desired.
When this was originally implemented, I generated these two loads using regular
ISD::LOAD nodes, now marked as aligned. Unfortunately, there is a problem with
this:
The alignment of a load does not contribute to its identity, and SDNodes
are uniqued. So, imagine that we have some unaligned load, L1, that is not
aligned. The routine will create two loads, L1(aligned) and (L1+16)(aligned).
Further imagine that there had already existed a load (L1+16)(unaligned) with
the same chain operand as the load L1. When (L1+16)(aligned) is created as part
of the lowering of L1, this load *is* also the (L1+16)(unaligned) node, just
now marked as aligned (because the new alignment overwrites the old). But the
original users of (L1+16)(unaligned) now get the data intended for the
permutation yielding the data for L1, and (L1+16)(unaligned) no longer exists
to get its own permutation-based expansion. This was PR19991.
A second potential problem has to do with the MMOs on these loads, which can be
used by AA during instruction scheduling to break chain-based dependencies. If
the new "aligned" loads get the MMO from the original unaligned load, this does
not represent the fact that it will load data from below the original address.
Normally, this would not matter, but this load might be combined with another
load pair for a previous vector, and then the dependency on the otherwise-
ignored lower bytes can matter.
To fix both problems, instead of generating the necessary loads using regular
ISD::LOAD instructions, ppc_altivec_lvx intrinsics are used instead. These are
provided with MMOs with a conservative address range.
Unfortunately, I no longer have a failing test case (since PR19991 was
reported, other changes in CodeGen have forced this bug back into hiding it
again). Nevertheless, this should fix the underlying problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214481
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Fri, 1 Aug 2014 05:07:20 +0000 (05:07 +0000)]
This patch implements transform for pattern "(A & ~B) ^ (~A) -> ~(A & B)".
Differential Revision: http://reviews.llvm.org/D4653
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214479
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Fri, 1 Aug 2014 04:59:26 +0000 (04:59 +0000)]
This patch implements transform for pattern "(A | B) & ((~A) ^ B) -> (A & B)".
Differential Revision: http://reviews.llvm.org/D4628
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214478
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Fri, 1 Aug 2014 04:50:31 +0000 (04:50 +0000)]
This patch implements transform for pattern "( A & (~B)) | (A ^ B) -> (A ^ B)"
Differential Revision: http://reviews.llvm.org/D4652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214477
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Fri, 1 Aug 2014 04:41:43 +0000 (04:41 +0000)]
This patch implements transform for pattern "(A & B) | ((~A) ^ B) -> (~A ^ B)".
Patch Credit to Ankit Jain !
Differential Revision: http://reviews.llvm.org/D4655
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214476
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 02:05:57 +0000 (02:05 +0000)]
R600/SI: Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214475
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 1 Aug 2014 01:25:55 +0000 (01:25 +0000)]
[FastISel][AArch64] Fix the immediate versions of the {s|u}{add|sub}.with.overflow intrinsics.
ADDS and SUBS cannot encode negative immediates or immediates larger than 12bit.
This fix checks if the immediate version can be used under this constraints and
if we can convert ADDS to SUBS or vice versa to support negative immediates.
Also update the test cases to test the immediate versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214470
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 1 Aug 2014 01:02:01 +0000 (01:02 +0000)]
[PowerPC] Recognize consecutive memory accesses from intrinsics
When generating unaligned vector loads, we need to search for other loads or
stores nearby offset by one vector width. If we find one, then we know that we
can safely generate another aligned load at that address. Otherwise, we must
generate the next load using an offset of the vector width minus one byte (so
we don't read off the end of the allocation if the base unaligned address
happened to be aligned at runtime). We had previously done this using only
other vector loads and stores, but did not consider the PowerPC-specific vector
load/store intrinsics. Now we'll also consider vector intrinsics. By itself,
this change is a feature enhancement, but is a necessary step toward fixing the
underlying problem behind PR19991.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214469
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 1 Aug 2014 00:59:22 +0000 (00:59 +0000)]
MS inline asm: Fix null SMLoc when 'ptr' is missing after dword & co
This improves the diagnostics from the regular assembler, but more
importantly it fixes an assertion when parsing inline assembly. Test
landing in Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214468
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 00:32:39 +0000 (00:32 +0000)]
R600/SI: Do abs/neg folding with ComplexPatterns
Abs/neg folding has moved out of foldOperands and into the instruction
selection phase using complex patterns. As a consequence of this
change, we now prefer to select the 64-bit encoding for most
instructions and the modifier operands have been dropped from
integer VOP3 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214467
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 00:32:36 +0000 (00:32 +0000)]
TableGen: Allow AddedComplexity values to be negative
This is useful for cases when stand-alone patterns are preferred to the
patterns included in the instruction definitions. Instead of requiring
that stand-alone patterns set a larger AddedComplexity value, which
can be confusing to new developers, the allows us to reduce the
complexity of the included patterns to achieve the same result.
There will be test cases for this added to the R600 backend in a
future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214466
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 00:32:35 +0000 (00:32 +0000)]
R600/SI: Simplify and fix handling of VOP2 in SIInstrInfo::legalizeOperands
We were incorrectly assuming that all VOP2 instructions can read SGPRs
in Src0, but this is not true for instructions that read carry-in from
VCC.
The old logic has been replaced with new logic which checks the defined
register classes of the VOP2 instruction to determine whether or not to
legalize the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214465
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 00:32:33 +0000 (00:32 +0000)]
R600/SI: Fold immediates when shrinking instructions
This will prevent us from using extra MOV instructions once we prefer
selecting 64-bit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214464
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 00:32:28 +0000 (00:32 +0000)]
R600/SI: Fix incorrect commute operation in shrink instructions pass
We were commuting the instruction by still shrinking it using the
original opcode.
NOTE: This is a candidate for the 3.5 branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214463
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 31 Jul 2014 23:57:38 +0000 (23:57 +0000)]
Add support for the X86 secure guard extensions instructions in assembler (SGX).
This allows assembling the two new instructions, encls and enclu for the
SKX processor model.
Note the diffs are a bigger than what might think, but to fit the new
MRM_CF and MRM_D7 in things in the right places things had to be
renumbered and shuffled down causing a bit more diffs.
rdar://
16228228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214460
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 31 Jul 2014 23:26:35 +0000 (23:26 +0000)]
X86 MC: Don't crash on empty memory operand parens
Instead, create an absolute memory operand.
Fixes PR20504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214457
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 31 Jul 2014 23:03:22 +0000 (23:03 +0000)]
X86 MC: Reject invalid segment registers before a memory operand colon
Previously we would execute unreachable during object emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214456
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Thu, 31 Jul 2014 22:57:46 +0000 (22:57 +0000)]
White space fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214455
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 31 Jul 2014 22:31:33 +0000 (22:31 +0000)]
Make classof in MemSDNode consistent with MemIntrinsicSDNode
If INTRINSIC_W_CHAIN and INTRINSIC_VOID are MemIntrinsicSDNodes, and a
MemIntrinsicSDNode is a MemSDNode, then INTRINSIC_W_CHAIN and INTRINSIC_VOID
must be MemSDNodes too.
Noticed by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214452
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Thu, 31 Jul 2014 22:11:03 +0000 (22:11 +0000)]
R600: Modernize work item intrinsics test
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214451
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Thu, 31 Jul 2014 21:45:05 +0000 (21:45 +0000)]
Make sure no loads resulting from load->switch DAGCombine are marked invariant
Currently when DAGCombine converts loads feeding a switch into a switch of
addresses feeding a load the new load inherits the isInvariant flag of the left
side. This is incorrect since invariant loads can be reordered in cases where it
is illegal to reoarder normal loads.
This patch adds an isInvariant parameter to getExtLoad() and updates all call
sites to pass in the data if they have it or false if they don't. It also
changes the DAGCombine to use that data to make the right decision when
creating the new load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214449
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Thu, 31 Jul 2014 21:22:22 +0000 (21:22 +0000)]
Improve the remark generated for -Rpass-missed.
The current remark is ambiguous and makes it sounds like explicitly specifying vectorization will allow the loop to be vectorized. This is not the case. The improved remark directs the user to -Rpass-analysis=loop-vectorize to determine the cause of the pass-miss.
Reviewed by Arnold Schwaighofer`
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214445
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 31 Jul 2014 21:18:38 +0000 (21:18 +0000)]
Revert "Remove MCObjectDisassembler.cpp as it is untested and unused." as it is apparently used, but the build didn't return errors weirdly.
This reverts commits 214437 and 214438.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214444
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Thu, 31 Jul 2014 21:02:40 +0000 (21:02 +0000)]
Improve the remark generated when a variable that is used outside the loop is not a reduction or induction variable.
Reviewed by Arnold Schwaighofer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214440
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 21:00:10 +0000 (21:00 +0000)]
Replaces a few pointers with references in llvm-nm.cpp.
This opens the way for a few std::uinque_ptr cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214439
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 31 Jul 2014 20:48:54 +0000 (20:48 +0000)]
Fixing CMake problems with MCObjectDisassembler.cpp not existing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214438
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 31 Jul 2014 20:44:46 +0000 (20:44 +0000)]
Remove MCObjectDisassembler.cpp as it is untested and unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214437
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 31 Jul 2014 20:33:22 +0000 (20:33 +0000)]
msbuild integration: remove duplicated lines and BOM from 2014 integration (PR20341)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214435
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 20:26:42 +0000 (20:26 +0000)]
DWOHolder takes ownership of the argument constructor, use std::unique_ptr.
Thanks to David Blaikie for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214434
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 20:19:36 +0000 (20:19 +0000)]
Use a reference instead of a pointer.
This makes using a std::unique_ptr in the caller more convenient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214433
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Thu, 31 Jul 2014 20:11:13 +0000 (20:11 +0000)]
Add documentation for lit's --show-unsupported flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214431
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 31 Jul 2014 20:04:51 +0000 (20:04 +0000)]
Clarify in PowerPC release notes that 32-bit PIC support is incomplete.
As requested, changing this wording slightly.
Thanks,
Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214430
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Schmidt [Thu, 31 Jul 2014 19:50:53 +0000 (19:50 +0000)]
Disable IsSub subregister assert. pr18663.
This is a follow-up to the activity in the bug at
http://llvm.org/bugs/show_bug.cgi?id=18663 . The underlying issue has
to do with how the KILL pseudo-instruction is handled. I defer to
Hal/Jakob/Uli for additional details and background.
This will disable the (bad?) assert, add an associated fixme comment,
and add a pair of tests.
The code change and the pr18663-2.ll test are copied from the referenced
bug. That test does not immediately fail in my environment, but I have
added the pr18663.ll test which does.
(Comment from Hal)
to provide everyone else with some context, this assert was not bad when
it was written. At that time, we only generated KILL pseudo instructions
around subregister copies. This logic, unfortunately, had its own problems.
In r199797, the relevant logic in MachineCopyPropagation was replaced to
generate KILLs for other kinds of copies too. This change in semantics broke
this now-problematic assumption in AggressiveAntiDepBreaker. The
AggressiveAntiDepBreaker really needs a proper cleanup to deal with the
change, but removing the assert (which just allows the function to return
false) is a safe conservative behavior, and should do for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214429
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 19:32:04 +0000 (19:32 +0000)]
Remove unused argument.
Thanks to Justin Bogner for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214426
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 19:29:23 +0000 (19:29 +0000)]
Move MCObjectSymbolizer.h to MC/MCAnalysis.
The cpp file is already in lib/MC/MCAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214424
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 31 Jul 2014 19:13:38 +0000 (19:13 +0000)]
Fix ScalarEvolutionExpander when creating a PHI in a block with duplicate predecessors
It seems that when I fixed this, almost exactly a year ago, I did not quite do
it correctly. When we have duplicate block predecessors, we can indeed not have
different incoming values for the same block, but we *must* have duplicate
entries. So, instead of skipping the duplicates, we explicitly add the
duplicate incoming values.
Fixes PR20442.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214423
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 18:46:24 +0000 (18:46 +0000)]
verify-uselistorder: Change the default -num-shuffles=5
Change the default for `-num-shuffles` to 5 and better document the
algorithm in the header docs of `verify-uselistorder`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214419
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 31 Jul 2014 18:43:43 +0000 (18:43 +0000)]
Create a default symver on Linux like ELF OSes.
Patch by Adam Jackson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214418
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 18:33:12 +0000 (18:33 +0000)]
UseListOrder: Handle self-users
Correctly sort self-users (such as PHI nodes). I added a targeted test
in `test/Bitcode/use-list-order.ll` and the final missing RUN line to
tests in `test/Assembly`.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214417
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 31 Jul 2014 18:28:08 +0000 (18:28 +0000)]
Fix loop end condition.
Note: This code appears to be untested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214416
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 31 Jul 2014 15:20:30 +0000 (15:20 +0000)]
Wrong heading level for PowerPC changes in release notes
Oops. Used the wrong heading level by mistake.
Thanks,
Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214405
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 31 Jul 2014 15:17:33 +0000 (15:17 +0000)]
Release Notes: Overriding PPC64 and PPC64LE ABI defaults is not yet supported.
I wrongly included a description of a patch that came in after 3.5 branched
and has not been backported.
Thanks,
Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214404
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 31 Jul 2014 14:38:17 +0000 (14:38 +0000)]
Add PowerPC release notes for 3.5.
Here's my take on 3.5 changes for PowerPC. Others please feel free to add,
edit, delete as desired.
Thanks,
Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214403
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 31 Jul 2014 12:58:50 +0000 (12:58 +0000)]
Fixing an -Woverloaded-virtual warnings by exposing the hidden virtual function as well. No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214400
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 31 Jul 2014 12:55:49 +0000 (12:55 +0000)]
Fixing a -Wcast-qual warning in GCC. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214399
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 31 Jul 2014 11:02:27 +0000 (11:02 +0000)]
[msan] Fix handling of array types.
Switch array type shadow from a single integer to
an array of integers (i.e. make it per-element).
This simplifies instrumentation of extractvalue and fixes PR20493.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214398
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 31 Jul 2014 09:11:04 +0000 (09:11 +0000)]
[asan] Support x86 REP MOVS asm instrumentation.
Patch by Yuri Gorshenin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214395
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Thu, 31 Jul 2014 07:16:59 +0000 (07:16 +0000)]
MergeFunctions, tiny refactoring:
cmpOperation has been renamed to cmpOperations (multiple form).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214392
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 06:25:37 +0000 (06:25 +0000)]
[FastISel][AArch64] Add basic bitcast support for conversion between float and int.
Fixes <rdar://problem/
17867078>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214389
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 06:25:33 +0000 (06:25 +0000)]
[FastISel][AArch64] Add sqrt intrinsic support.
Fixes <rdar://problem/
17867067>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214388
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 31 Jul 2014 04:49:29 +0000 (04:49 +0000)]
InstCombine: Correctly propagate NSW/NUW for x-(-A) -> x+A
We can only propagate the nsw bits if both subtraction instructions are
marked with the appropriate bit.
N.B. We only propagate the nsw bit in InstCombine because the nuw case
is already handled in InstSimplify.
This fixes PR20189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214385
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 31 Jul 2014 04:49:18 +0000 (04:49 +0000)]
InstSimplify: Simplify (X - (0 - Y)) if the second sub is NUW
If the NUW bit is set for 0 - Y, we know that all values for Y other
than 0 would produce a poison value. This allows us to replace (0 - Y)
with 0 in the expression (X - (0 - Y)) which will ultimately leave us
with X.
This partially fixes PR20189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214384
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 31 Jul 2014 04:25:36 +0000 (04:25 +0000)]
Fix some grammatical errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214383
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 04:10:43 +0000 (04:10 +0000)]
[FastISel][AArch64] Update and enable patchpoint and stackmap intrinsic tests for FastISel.
This commit updates the existing SelectionDAG tests for the stackmap and patchpoint
intrinsics and enables FastISel testing. It also splits up the tests into separate
files, due to different codegen between SelectionDAG and FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214382
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 04:10:40 +0000 (04:10 +0000)]
[FastISel][AArch64] Add MachO large code model support for function calls.
Currently the large code model for MachO uses the GOT to make function calls.
Emit the required adrp and ldr instructions to load the address from the GOT.
Related to <rdar://problem/
17733076>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214381
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 03:36:00 +0000 (03:36 +0000)]
A std::unique_ptr case I missed in the previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214379
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 03:12:45 +0000 (03:12 +0000)]
Use std::unique_ptr to make the ownership explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214377
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 31 Jul 2014 01:44:00 +0000 (01:44 +0000)]
Don't fail tablegen immediately after failing to set a value.
Instead allow the variable to be declared, but don't attach an initializer. This allows more than a single error to be emitted before we exit.
Test case to follow soon in another patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214375
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 31 Jul 2014 01:43:57 +0000 (01:43 +0000)]
Add a better error message when failing to assign one tablegen value to another
This is currently for assigning from one bit init to another. It can easily be extended to other types.
Test to follow soon in another patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214374
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 31 Jul 2014 01:43:54 +0000 (01:43 +0000)]
Fix bit initializer which was one bit too long, but worked so long as we silently dropped the leading 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214373
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 31 Jul 2014 01:43:51 +0000 (01:43 +0000)]
Fix bit initializer which was one bit too long, but worked so long as we silently dropped the leading 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214372
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 31 Jul 2014 01:14:09 +0000 (01:14 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214370
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 00:13:28 +0000 (00:13 +0000)]
UseListOrder: Don't give constant IDs to GlobalValues
Since initializers of GlobalValues are being assigned IDs before
GlobalValues themselves, explicitly exclude GlobalValues from the
constant pool. Added targeted test in `test/Bitcode/use-list-order.ll`
and added two more RUN lines in `test/Assembly`.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214368
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 00:11:16 +0000 (00:11 +0000)]
[FastISel] Fix the patchpoint intrinsic lowering in FastISel for large target addresses.
This fixes a mistake where I accidentially dropped the upper 32bit of a
64bit pointer during FastISel lowering of the patchpoint intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214367
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 31 Jul 2014 00:11:11 +0000 (00:11 +0000)]
[FastISel][AArch64 and X86] Don't emit stores for UNDEF arguments during function call lowering.
UNDEF arguments are not ment to be touched - especially for the webkit_js
calling convention. This fix reproduces the already existing behavior of
SelectionDAG in FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214366
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 31 Jul 2014 00:10:27 +0000 (00:10 +0000)]
verify-uselistorder: Add RUN lines to cases in test/Assembly
Add RUN line for `verify-uselistorder` to every test in `test/Assembly`,
unless it's a negative check (assembler rejects it) or verification
fails.
There are three files that verification fails on (so I've left out the
RUN lines):
- 2002-08-22-DominanceProblem.ll
- ConstantExprFold.ll
- ConstantExprFoldCast.ll
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214365
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 31 Jul 2014 00:07:33 +0000 (00:07 +0000)]
X86 asm parser: Avoid duplicating the list of aliased instructions
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214364
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Wed, 30 Jul 2014 23:59:11 +0000 (23:59 +0000)]
Add mtpid/mfpid for BookE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214363
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Jul 2014 23:39:30 +0000 (23:39 +0000)]
Attempt at fixing the windows dll build.
It looks like only direct (i.e., explicitly listed) dependencies are
scanned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214361
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 30 Jul 2014 23:36:06 +0000 (23:36 +0000)]
llvm-profdata: Add a test for mismatched numbers of counters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214360
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 30 Jul 2014 23:02:01 +0000 (23:02 +0000)]
llvm-profdata: Use consistent file suffixes in tests
In some places we've been using different suffixes for the different
file formats involved in instrprof, but in others we've just
ambiguously used .profdata. Update the test files to indicate the
types of file more obviously.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214357
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Jul 2014 22:51:54 +0000 (22:51 +0000)]
Use "weak alias" instead of "alias weak"
Before this patch we had
@a = weak global ...
but
@b = alias weak ...
The patch changes aliases to look more like global variables.
Looking at some really old code suggests that the reason was that the old
bison based parser had a reduction for alias linkages and another one for
global variable linkages. Putting the alias first avoided the reduce/reduce
conflict.
The days of the old .ll parser are long gone. The new one parses just "linkage"
and a later check is responsible for deciding if a linkage is valid in a
given context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214355
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Wed, 30 Jul 2014 22:51:15 +0000 (22:51 +0000)]
Refactor TLBIVAX and add tlbsx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214354
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 30 Jul 2014 22:23:11 +0000 (22:23 +0000)]
X86 asm parser: Use a loop to disambiguate suffixes instead of copy paste
This works towards making the Intel syntax asm matcher use a completely
different disambiguation strategy.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214352
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Jul 2014 22:04:37 +0000 (22:04 +0000)]
[FastISel][AArch64] Add select folding support for the XALU intrinsics.
This improves the code generation for the XALU intrinsics when the
condition is feeding a select instruction.
This also updates and enables the XALU unit tests for FastISel.
This fixes <rdar://problem/
17831117>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214350
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Jul 2014 22:04:34 +0000 (22:04 +0000)]
[FastISel][AArch64] Add branch folding support for the XALU intrinsics.
This improves the code generation for the XALU intrinsics when the
condition is feeding a branch instruction.
This is related to <rdar://problem/
17831117>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214349
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Jul 2014 22:04:31 +0000 (22:04 +0000)]
[FastISel][AArch64] Add {s|u}{add|sub|mul}.with.overflow intrinsic support.
This commit adds support for the {s|u}{add|sub|mul}.with.overflow intrinsics.
The unit tests for FastISel will be enabled in a later commit, once there is
also branch and select folding support.
This is related to <rdar://problem/
17831117>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214348
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Jul 2014 22:04:28 +0000 (22:04 +0000)]
[FastISel] Move the helper function isCommutativeIntrinsic into FastISel base class.
Move the helper function isCommutativeIntrinsic into the FastISel base class,
so it can be used by more than just one backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214347
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Jul 2014 22:04:25 +0000 (22:04 +0000)]
[FastISel][AArch64] Create helper functions to create the various multiplies on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214346
91177308-0d34-0410-b5e6-
96231b3b80d8