Chandler Carruth [Sat, 22 Nov 2014 05:44:43 +0000 (05:44 +0000)]
[x86] Add some tests for a common unpack pattern of vector shuffle that
has a remarkably unique and efficient lowering.
While we get this some of the time already, we miss a few cases and
there wasn't a principled reason we got it. We should at least test
this. v8 already has tests for this pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222607
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 22 Nov 2014 04:52:55 +0000 (04:52 +0000)]
InstCombine: Preserve nsw when folding X*(2^C) -> X << C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222606
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 22 Nov 2014 04:52:52 +0000 (04:52 +0000)]
InstCombine: Preserve nsw/nuw for ((X << C2)*C1) -> (X * (C1 << C2))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222605
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 22 Nov 2014 04:52:38 +0000 (04:52 +0000)]
InstCombine: Preserve nsw for (mul %V, -1) -> (sub 0, %V)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222604
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Fri, 21 Nov 2014 23:36:44 +0000 (23:36 +0000)]
[InstCombine] Re-commit of r218721 (Optimize icmp-select-icmp sequence)
Fixes the self-host fail. Note that this commit activates dominator
analysis in the combiner by default (like the original commit did).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222590
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 21 Nov 2014 22:39:34 +0000 (22:39 +0000)]
Fix transformation of add with pc argument to adr for non-immediate
arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222587
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 21 Nov 2014 22:34:29 +0000 (22:34 +0000)]
[asan] remove old experimental code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222586
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:31:47 +0000 (22:31 +0000)]
R600/SI: Add a failing test case for offset order in ds_read2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222585
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:31:46 +0000 (22:31 +0000)]
R600/SI: Add an s_mov_b32 to patterns which use the M0RegClass
We need to use a s_mov_b32 rather than a copy, so that CSE will
eliminate redundant moves to the m0 register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222584
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:31:44 +0000 (22:31 +0000)]
R600/SI: Emit s_mov_b32 m0, -1 before every DS instruction
This s_mov_b32 will write to a virtual register from the M0Reg
class and all the ds instructions now take an extra M0Reg explicit
argument.
This change is necessary to prevent issues with the scheduler
mixing together instructions that expect different values in the m0
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222583
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:06:37 +0000 (22:06 +0000)]
R600/SI: Add SIFoldOperands pass
This pass attempts to fold the source operands of mov and copy
instructions into their uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222581
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Fri, 21 Nov 2014 22:04:35 +0000 (22:04 +0000)]
[mips][microMIPS] This patch implements functionality in MIPS delay slot
filler such as if delay slot filler have to put NOP instruction into the
delay slot of microMIPS BEQ or BNE instruction which uses the register $0,
then instead of emitting NOP this instruction is replaced by the corresponding
microMIPS compact branch instruction, i.e. BEQZC or BNEZC.
Differential Revision: http://reviews.llvm.org/D3566
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222580
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:00:16 +0000 (22:00 +0000)]
R600/SI: Mark s_mov_b32 and s_mov_b64 as rematerializable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222579
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Nov 2014 22:00:13 +0000 (22:00 +0000)]
R600/SI: Use hex notation for constant in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222578
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 21 Nov 2014 21:54:59 +0000 (21:54 +0000)]
[Hexagon] Adding sxth instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222577
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 21 Nov 2014 21:35:52 +0000 (21:35 +0000)]
[Hexagon] Adding sxtb instruction. Renaming some identically named classes that will be removed after converting referencing defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222575
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 21 Nov 2014 21:25:18 +0000 (21:25 +0000)]
[asan] add statistic counter to dynamic alloca instrumentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222573
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 21 Nov 2014 21:19:18 +0000 (21:19 +0000)]
[Hexagon] Removing SUB_rr and replacing with A2_sub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222571
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 21 Nov 2014 20:16:09 +0000 (20:16 +0000)]
Remove duplication of relocation names in lib/Object/ELFYAML.cpp
We can now use the ELF relocation .def files to create the mapping
of relocation numbers to names and avoid having to duplicate the
list of relocations.
Patch by Will Newton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222567
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 21 Nov 2014 20:16:07 +0000 (20:16 +0000)]
Remove duplication of relocation names in lib/Object/ELF.cpp
We can now use the ELF relocation .def files to create the mapping
of relocation numbers to names and avoid having to duplicate the
list of relocations.
Patch by Will Newton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222566
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 21 Nov 2014 20:16:02 +0000 (20:16 +0000)]
Split ELF relocation defintions into per-architecture .def files
This should allow the list of relocations for a particular
architecture to be kept in a single header rather than duplicated
whenever we need to enumerate all the relocations.
Patch by Will Newton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222565
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 21 Nov 2014 19:55:23 +0000 (19:55 +0000)]
Debug Info: revert r222195, r222210 and r222239.
This is no longer needed after David's fix at r222377 + r222485.
rdar://
18958417
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222563
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Fri, 21 Nov 2014 19:53:24 +0000 (19:53 +0000)]
Disable header duplication at -Oz in loop-rotate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222562
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 21 Nov 2014 19:47:48 +0000 (19:47 +0000)]
Debug Info: add an assertion that the context field of a global variable can not
be a DIType with identifier.
This makes sure that there is no need to use DIScopeRef for global variable's
context.
rdar://
18958417
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222561
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 21 Nov 2014 19:24:55 +0000 (19:24 +0000)]
[Objective-C] Support a new special module flag that will be put into the
objc_imageinfo struct.
rdar://
17954668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222558
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 21 Nov 2014 19:07:46 +0000 (19:07 +0000)]
LazyValueInfo: range'ify some for-loops. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222557
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Nov 2014 19:03:35 +0000 (19:03 +0000)]
Add params() to FunctionType. NFC.
While at it, also use makeArrayRef in elements().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222556
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Nov 2014 18:58:38 +0000 (18:58 +0000)]
Don't repeat class/function/variable names in comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222555
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 21 Nov 2014 18:58:23 +0000 (18:58 +0000)]
LazyValueInfo: fix some typos and indentation, etc. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222554
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Nov 2014 18:53:05 +0000 (18:53 +0000)]
Add and use a helper elements() to StructType. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222553
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 21 Nov 2014 18:06:09 +0000 (18:06 +0000)]
Allow multiple -debug-only args
Debug output is shown if any of the -debug-only arguments match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222547
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Nov 2014 18:05:59 +0000 (18:05 +0000)]
Less space; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222546
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Nov 2014 18:05:55 +0000 (18:05 +0000)]
Fix formatting. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222545
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Nov 2014 17:40:04 +0000 (17:40 +0000)]
Add a feature flag for slow 32-byte unaligned memory accesses [x86].
This patch adds a feature flag to avoid unaligned 32-byte load/store AVX codegen
for Sandy Bridge and Ivy Bridge. There is no functionality change intended for
those chips. Previously, the absence of AVX2 was being used as a proxy to detect
this feature. But that hindered codegen for AVX-enabled AMD chips such as btver2
that do not have the 32-byte unaligned access slowdown.
Performance measurements are included in PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ).
Differential Revision: http://reviews.llvm.org/D6355
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222544
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 21 Nov 2014 17:21:18 +0000 (17:21 +0000)]
Revert "Allow FDE references outside the +/-2GB range supported by PC relative offsets for code models other than small/medium. For JIT application, memory layout is less controlled and can result in truncations otherwise."
This reverts commit r222538.
It's causing test failures for CFI, at least on Darwin:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1189/
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/1391/
Note that the previous incremental build was on r222537, and the CFI
tests weren't failing:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1188/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Nov 2014 14:53:03 +0000 (14:53 +0000)]
[x86] Restructure the checking patterns for v16 and v32 avx2 vector
shuffle lowering to allow much better blend matching.
Specifically, with the new structure the code seems clearer to me and we
correctly can hit the cases where merging two 128-bit lanes is a clear
win and can be shuffled cheaply afterward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222539
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 21 Nov 2014 14:42:43 +0000 (14:42 +0000)]
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Nov 2014 14:33:24 +0000 (14:33 +0000)]
[x86] Make the previous logic significantly less conservative and get
a bunch more improvements.
Non-lane-crossing is fine, the key is that lane merging only makes sense
for single-input shuffles. Not sure why I got so turned around here. The
code all works, I was just using the wrong model for it.
This only updates v4 and v8 lowering. The v16 and v32 lowering requires
restructuring the entire check sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222537
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 21 Nov 2014 14:32:06 +0000 (14:32 +0000)]
[DAG] Teach how to turn a build_vector into a shuffle if some of the operands are zero.
Before this patch, the DAGCombiner only tried to convert build_vector dag nodes
into shuffles if all operands were either extract_vector_elt or undef.
This patch improves that logic and teaches the DAGCombiner how to deal with
build_vector dag nodes where one or more operands are zero. A build_vector
dag node with some zero operands is turned into a shuffle only if the resulting
shuffle mask is legal for the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222536
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Nov 2014 13:56:05 +0000 (13:56 +0000)]
[x86] Teach the x86 vector shuffle lowering to detect mergable 128-bit
lanes.
By special casing these we can often either reduce the total number of
shuffles significantly or reduce the number of (high latency on Haswell)
AVX2 shuffles that potentially cross 128-bit lanes. Even when these
don't actually cross lanes, they have much higher latency to support
that. Doing two of them and a blend is worse than doing a single insert
across the 128-bit lanes to blend and then doing a single interleaved
shuffle.
While this seems like a narrow case, it kept cropping up on me and the
difference is *huge* as you can see in many of the test cases. I first
hit this trying to perfectly fix the interleaving shuffle patterns used
by Halide for AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222533
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Nov 2014 12:33:46 +0000 (12:33 +0000)]
[x86] Remove more windows line endings that slipped into this file...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Nov 2014 12:17:50 +0000 (12:17 +0000)]
[x86] Add a bunch of test cases to 256-bit shuffles that exercise
merging 128-bit subvectors and also shuffling all the elements of those
subvectors. Currently we generate pretty bad code for many of these, but
I'm testing a patch that should dramatically improve this in addition to
making the shuffle lowering robust to other changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222525
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 21 Nov 2014 11:33:07 +0000 (11:33 +0000)]
[DAG] Refactor the shuffle combining logic in DAGCombiner. NFC.
This patch simplifies the logic that combines a pair of shuffle nodes into
a single shuffle if there is a legal mask. Also added comments to better
describe the algorithm. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222522
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Volkov [Fri, 21 Nov 2014 11:19:34 +0000 (11:19 +0000)]
[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers
Differential Revision: http://reviews.llvm.org/D5938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222521
91177308-0d34-0410-b5e6-
96231b3b80d8
Yury Gribov [Fri, 21 Nov 2014 10:29:50 +0000 (10:29 +0000)]
[asan] Add new hidden compile-time flag asan-instrument-allocas to sanitize variable-sized dynamic allocas. Patch by Max Ostapenko.
Reviewed at http://reviews.llvm.org/D6055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222519
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Nov 2014 09:14:45 +0000 (09:14 +0000)]
Add LLVMScalarOpts to LLVMPowerPCCodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222516
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 21 Nov 2014 06:39:58 +0000 (06:39 +0000)]
DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same divisor info FMULs by the reciprocal.
E.g., ( a / D; b / D ) -> ( recip = 1.0 / D; a * recip; b * recip)
A hook is added to allow the target to control whether it needs to do such combine.
Reviewed in http://reviews.llvm.org/D6334
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222510
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 21 Nov 2014 05:58:21 +0000 (05:58 +0000)]
Remove a bunch of unnecessary typecasts to 'const TargetRegisterClass *'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222509
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 21 Nov 2014 05:58:14 +0000 (05:58 +0000)]
Add extra new line and remove some trailing whitespace from tablegen RegisterInfo output file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222508
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Nov 2014 05:15:41 +0000 (05:15 +0000)]
Fix a silly bug in StreamingMemoryObject.cpp.
The logic for detecting EOF was wrong and would fail if we ever requested
more than 16k past the last read position.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222505
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 21 Nov 2014 04:35:51 +0000 (04:35 +0000)]
[PPC] Use SeparateConstOffsetFromGEP
This mirrors r222331, which enabled SeparateConstOffsetFromGEP on AArch64, in
the PowerPC backend. Yields, on a POWER7 machine, a 30% speedup on
SingleSource/Benchmarks/Shootout/nestedloop (this might just be from LICM,
there is a store moved out of the inner loop) and a potential speedup on
MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode. Regardless, it
makes some code look cleaner, and synchronizing the backends in this regard
seems like a generally good thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222504
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 21 Nov 2014 02:42:08 +0000 (02:42 +0000)]
Add accessor marcos to ConstantPlaceHolder, similar to those in the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222502
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 21 Nov 2014 02:37:38 +0000 (02:37 +0000)]
This Reassociate change unintentionally slipped in r222499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222500
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 21 Nov 2014 02:34:55 +0000 (02:34 +0000)]
SROA: The alloca type isn't a candidate promotion type for vectors
The alloca's type is irrelevant, only those types which are used in a
load or store of the exact size of the slice should be considered.
This manifested as an assertion failure when we compared the various
types: we had a size mismatch.
This fixes PR21480.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222499
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 21 Nov 2014 02:22:46 +0000 (02:22 +0000)]
Clarify the description of the noalias attribute
The previous description of the noalias attribute did not accurately specify
the implemented semantics, and the terminology used differed unnecessarily
from that used by the C specification to define the semantics of restrict. For
the argument attribute, the semantics can be precisely specified in terms of
objects accessed through pointers based on the arguments, and this is now what
is done.
Saying that the semantics are 'slightly weaker' than that provided by C99
restrict is not really useful without further elaboration, so that has been
removed from the sentence.
noalias on a return value is really used to mean that the function is
malloc-like (and, in fact, we use this attribute to represent
__attribute__((malloc)) in Clang), and this is a stronger guarantee than that
provided by restrict (because it is a property of the pointed-to memory region,
not just a guarantee on object access). Clarifying this is relevant to fixing
(and was motivated by the discussion on) PR21556.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222497
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 21 Nov 2014 01:57:09 +0000 (01:57 +0000)]
[MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead
now that the old JIT has been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222494
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 21 Nov 2014 01:19:09 +0000 (01:19 +0000)]
Add curly braces to workaround an MSVC bug.
MSVC can't parse this pattern for range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222491
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 21 Nov 2014 00:47:19 +0000 (00:47 +0000)]
[X86] Do not custom lower UINT_TO_FP when the target type does not
match the custom lowering.
<rdar://problem/
19026326>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222489
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 21 Nov 2014 00:39:43 +0000 (00:39 +0000)]
Verifier: Check that all instructions have their parent pointers set up
correctly. This helps with catching problems caused by IRBuilder abuse
such as the one fixed in CFE r222487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222488
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 20 Nov 2014 23:51:47 +0000 (23:51 +0000)]
Fix more instances of -Wsentinel on Windows with s/NULL/nullptr/
Follow up to r221940, where I must not have caught em all. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222481
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 20 Nov 2014 23:37:18 +0000 (23:37 +0000)]
Add out of line virtual destructors to all LLVMTargetMachine subclasses
These recently all grew a unique_ptr<TargetLoweringObjectFile> member in
r221878. When anyone calls a virtual method of a class, clang-cl
requires all virtual methods to be semantically valid. This includes the
implicit virtual destructor, which triggers instantiation of the
unique_ptr destructor, which fails because the type being deleted is
incomplete.
This is just part of the ongoing saga of PR20337, which is affecting
Blink as well. Because the MSVC ABI doesn't have key functions, we end
up referencing the vtable and implicit destructor on any virtual call
through a class. We don't actually end up emitting the dtor, so it'd be
good if we could avoid this unneeded type completion work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222480
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 20 Nov 2014 22:48:24 +0000 (22:48 +0000)]
Update Makefile following directory removal in r222466
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222475
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 20 Nov 2014 22:40:25 +0000 (22:40 +0000)]
SimplifyCFG: Refactor GatherConstantCompares() result in a struct
Code seems cleaner and easier to understand this way
This is basically r222416, after fixes for MSVC lack of standard
support, and a few cleaning (got rid of a warning).
Thanks Nakamura Takumi and Nico Weber for the MSVC fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222472
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 20 Nov 2014 22:20:40 +0000 (22:20 +0000)]
[Hexagon] [NFC] Deleting empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222466
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 20 Nov 2014 21:56:35 +0000 (21:56 +0000)]
[Hexagon] [NFC] Merging InstPrinter directory in to MCTargetDesc since they have a circular dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222458
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 20 Nov 2014 21:16:16 +0000 (21:16 +0000)]
[MCJIT] Remove JITEventListener::NotifyFunctionEmitted - this method is dead
now that the legacy JIT has been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222453
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Thu, 20 Nov 2014 20:19:55 +0000 (20:19 +0000)]
Fix a trip-count overflow issue in LoopUnroll.
Currently LoopUnroll generates a prologue loop before the main loop
body to execute first N%UnrollFactor iterations. Also, this loop is
used if trip-count can overflow - it's determined by a runtime check.
However, we've been mistakenly optimizing this loop to a linear code for
UnrollFactor = 2, not taking into account that it also serves as a safe
version of the loop if its trip-count overflows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222451
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Thu, 20 Nov 2014 19:33:33 +0000 (19:33 +0000)]
Compilation test for PostOrderIterator.
If the template specialization for externally managed sets in
PostOrderIterator call too far out of sync with each other, this unit
test will fail to build. This is especially useful for developers who
may not build Clang (the only in-tree user) every time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222447
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Thu, 20 Nov 2014 19:33:30 +0000 (19:33 +0000)]
Update template specialization to reflect API changes.
po_iterator_storage's insertEdge was updated to reflect the API
changes from many of our insert methods in r222334, however the
template specialization for external storage was not updated. This
updates the specialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222446
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 20 Nov 2014 18:01:26 +0000 (18:01 +0000)]
X86: use the correct alloca symbol for Windows Itanium
Windows itanium targets the MSVCRT, and the stack probe symbol is provided by
MSVCRT. This corrects the emission of stack probes on i686-windows-itanium.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222439
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 20 Nov 2014 16:21:11 +0000 (16:21 +0000)]
Make DWARFAcceleratorTable::dump() const.
As dump() methods should be. To allow that, do not store the DWARFFormValue
objects used for the dump in the header data.
Per Alexey's suggestion!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222436
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 20 Nov 2014 16:21:06 +0000 (16:21 +0000)]
Add missing copyright headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222435
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 20 Nov 2014 15:52:34 +0000 (15:52 +0000)]
Do not create a replaceable Variables MDNode for function forward decls.
These fields would need to be explicitly deleted before we RAUW the temporary
node anyway (this was done in cfe commit r222373). Instead, do not create
these useless nodes in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222434
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 20 Nov 2014 13:32:16 +0000 (13:32 +0000)]
MCJIT tests passing on ARM after r222414 fixed the relocation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222430
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 20 Nov 2014 12:36:43 +0000 (12:36 +0000)]
Revert r222416, r222422, r222426: the former revision had problems and fixing them introduced bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222428
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 20 Nov 2014 11:48:58 +0000 (11:48 +0000)]
Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222426
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 20 Nov 2014 08:59:02 +0000 (08:59 +0000)]
SimplifyCFG.cpp: Tweak to let msc17 compliant.
- Use LLVM_DELETED_FUNCTION.
- Don't use member initializers.
- Don't use initializer list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222422
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 20 Nov 2014 06:51:02 +0000 (06:51 +0000)]
SimplifyCFG: Refactor GatherConstantCompares() result in a struct
Code seems cleaner and easier to understand this way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222416
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyoti Allur [Thu, 20 Nov 2014 05:58:11 +0000 (05:58 +0000)]
[ELF] Prevent ARM ELF object writer from generating deprecated relocation code R_ARM_PLT32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222414
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 20 Nov 2014 05:32:10 +0000 (05:32 +0000)]
Add a test for r221870
bad-relocs.obj.coff-i386 has a relocation whose symbol index is outside
the symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222413
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Nov 2014 05:22:37 +0000 (05:22 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222412
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Nov 2014 05:22:35 +0000 (05:22 +0000)]
Remove unnecessary extra spaces from tablegen register info output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222411
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Nov 2014 05:22:32 +0000 (05:22 +0000)]
Use array_lengthof instead of sizeof(array)/sizeof(element) in a tablegen output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222410
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 20 Nov 2014 01:27:19 +0000 (01:27 +0000)]
Remove support for undocumented SpecialCaseList entries.
"global-init", "global-init-src" and "global-init-type" were originally
used to blacklist entities in ASan init-order checker. However, they
were never documented, and later were replaced by "=init" category.
Old blacklist entries should be converted as follows:
* global-init:foo -> global:foo=init
* global-init-src:bar -> src:bar=init
* global-init-type:baz -> type:baz=init
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222401
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 19 Nov 2014 23:22:23 +0000 (23:22 +0000)]
[Hexagon] Adding A2_xor instruction with IR selection pattern and test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222399
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 19 Nov 2014 23:21:20 +0000 (23:21 +0000)]
Revert "[Reassociate] As the expression tree is rewritten make sure the operands are"
This reverts commit r222142. This is causing/exposing an execution-time regression
in spec2006/gcc and coremark on AArch64/A57/Ofast.
Conflicts:
test/Transforms/Reassociate/optional-flags.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222398
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 19 Nov 2014 22:58:04 +0000 (22:58 +0000)]
[Hexagon] Adding A2_or instruction with IR selection pattern and test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222396
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 19 Nov 2014 22:39:21 +0000 (22:39 +0000)]
gold-plugin: Fix typo in error message
Spotted while reading code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222395
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 19 Nov 2014 22:03:21 +0000 (22:03 +0000)]
[CMake] Update GetSVN.cmake to use LLVM version control helper scripts.
This allows the logic to work with Git, and also uses the variable names
to match what Clang is actually looking for.
This is a re-application of r190556 and r190808. This changes the interface
of GetSVN.cmake. Clang change to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222391
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 19 Nov 2014 21:55:31 +0000 (21:55 +0000)]
ADT: windows itanium targets msvcrt.dll
Update the isOSMSVCRT to correctly identify that windows-itanium uses
msvcrt.dll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222389
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Nov 2014 21:16:11 +0000 (21:16 +0000)]
Try to fix MSVS build after r222384. No intended behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222386
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 19 Nov 2014 20:20:16 +0000 (20:20 +0000)]
Fix Use-of-uninitialized-value for adrp_addr and adrp_inst in MachODump.cpp
Fixes PR21607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222385
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 19 Nov 2014 20:09:11 +0000 (20:09 +0000)]
SimplifyCFG: turn recursive GatherConstantCompares into iterative
A long sequence of || or && could lead to a stack explosion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222384
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 19 Nov 2014 19:46:17 +0000 (19:46 +0000)]
RegisterCoalescer: Improve debug messages
- Show "Considering..." message after flipping so you actually see the final
destination vreg as destination.
- Add a message on final join, so you can grep for "Success" messages to obtain
a list of which register got merged with which.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222382
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 19 Nov 2014 19:46:15 +0000 (19:46 +0000)]
Add a print and verify pass after the RegisterCoalescer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222381
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 19 Nov 2014 19:46:13 +0000 (19:46 +0000)]
MachineVerifier: Report register for bad liveranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222380
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 19 Nov 2014 19:46:11 +0000 (19:46 +0000)]
Introduce register dump helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222379
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 19 Nov 2014 19:36:18 +0000 (19:36 +0000)]
AliasSet: Simplify mergeSetIn
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222376
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 19 Nov 2014 19:34:29 +0000 (19:34 +0000)]
[X86] Improved lowering of v4x32 build_vector dag nodes.
This patch improves the lowering of v4f32 and v4i32 build_vector dag nodes
that are known to have at least two non-zero elements.
With this patch, a build_vector that performs a blend with zero is
converted into a shuffle. This is done to let the shuffle legalizer expand
the dag node in a optimal way. For example, if we know that a build_vector
performs a blend with zero, we can try to lower it as a movq/blend instead of
always selecting an insertps.
This patch also improves the logic that lowers a build_vector into a insertps
with zero masking. See for example the extra test cases added to test sse41.ll.
Differential Revision: http://reviews.llvm.org/D6311
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222375
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 19 Nov 2014 19:15:41 +0000 (19:15 +0000)]
[ADT] Fix PR20728 - Incorrect APFloat::fusedMultiplyAdd results for x86_fp80.
As detailed at http://llvm.org/PR20728, due to an internal overflow in
APFloat::multiplySignificand the APFloat::fusedMultiplyAdd method can return
incorrect results for x87DoubleExtended (x86_fp80) values. This commonly
manifests as incorrect constant folding of libm fmal calls on x86. E.g.
fmal(1.0L, 1.0L, 3.0L) == 0.0L (should be 4.0L)
This patch fixes PR20728 by adding an extra bit to the significand for
intermediate results of APFloat::multiplySignificand, avoiding the overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222374
91177308-0d34-0410-b5e6-
96231b3b80d8