OSDN Git Service
James Molloy [Wed, 31 Oct 2012 09:10:56 +0000 (09:10 +0000)]
Add support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.
Patch by Pete Chou!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167109
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 31 Oct 2012 09:07:37 +0000 (09:07 +0000)]
Add support for Cortex-A15 host recognition.
No testcase, as this is only testable on a C-A15 board.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167108
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 31 Oct 2012 05:21:10 +0000 (05:21 +0000)]
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167107
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 31 Oct 2012 04:59:46 +0000 (04:59 +0000)]
Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from Cameron McInally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167106
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 31 Oct 2012 04:29:58 +0000 (04:29 +0000)]
instcombine: Migrate strpbrk optimizations
This patch migrates the strpbrk optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167105
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 31 Oct 2012 04:14:09 +0000 (04:14 +0000)]
Clean up redundant SP register maintained in X86 TLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167104
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 31 Oct 2012 03:33:06 +0000 (03:33 +0000)]
instcombine: Migrate strlen optimizations
This patch migrates the strlen optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167103
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 31 Oct 2012 03:33:00 +0000 (03:33 +0000)]
instcombine: Migrate strncpy optimizations
This patch migrates the strncpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167102
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 31 Oct 2012 03:31:07 +0000 (03:31 +0000)]
LoopVectorize: Do not vectorize loops with tiny constant trip counts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167101
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 31 Oct 2012 01:15:05 +0000 (01:15 +0000)]
This patch addresses an ABI compatibility issue with empty aggregate
parameters. Examples of these are:
struct { } a;
union { } b[256];
int a[0];
An empty aggregate has an address, although dereferencing that address is
pointless. When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area. Passing an empty aggregate by reference passes an address just as
for any other aggregate. Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.
The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value. The handling of return values and by-reference
parameters was already correct.
Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167090
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 31 Oct 2012 00:56:01 +0000 (00:56 +0000)]
Change signature of function RAFast::spillAll to avoid conversion between
type MachineInstr* and MachineBasicBlock::iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167088
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 31 Oct 2012 00:54:26 +0000 (00:54 +0000)]
xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167087
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 31 Oct 2012 00:50:52 +0000 (00:50 +0000)]
Check that iterator I is not the end iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167086
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 31 Oct 2012 00:46:18 +0000 (00:46 +0000)]
Add extra declarations of hash_value needed to build llvm with xlc 12.1.
Patch by Kai!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167085
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 31 Oct 2012 00:45:26 +0000 (00:45 +0000)]
Add support for loops that don't start with Zero.
This is important for loops in the LAPACK test-suite.
These loops start at 1 because they are auto-converted from fortran.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167084
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 31 Oct 2012 00:20:56 +0000 (00:20 +0000)]
instcombine: Migrate stpcpy optimizations
This patch migrates the stpcpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier. Note that the
__stpcpy_chk simplifications were migrated in a previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167083
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 31 Oct 2012 00:20:51 +0000 (00:20 +0000)]
instcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt
r166198 migrated the strcpy optimization to instcombine. The strcpy
simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp
was also doing some __strcpy_chk simplifications. Those fortified
simplifications were migrated as well, but introduced a bug in the
__stpcpy_chk simplifier in the process. This happened because the
__strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt
which was updated with simplifications that worked for __strcpy_chk, but
not __stpcpy_chk.
This patch fixes the problem by adding proper test coverage and creating a
new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167082
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 30 Oct 2012 23:53:59 +0000 (23:53 +0000)]
X86 SSE: update rsqrtss and rcpss to use two source operands and
the first source operand is tied to the destination operand.
This is to accurately model the corresponding instructions where the upper
bits are unmodified.
rdar://
12558838
PR14221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167064
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 30 Oct 2012 22:21:55 +0000 (22:21 +0000)]
Fix regression in old-style JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167057
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 30 Oct 2012 22:15:38 +0000 (22:15 +0000)]
X86 MMX: optimize transfer from mmx to i32
We used to generate a store (movq) + a load.
Now we use movd.
rdar://
9946746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167056
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 22:06:26 +0000 (22:06 +0000)]
Add documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167055
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Oct 2012 21:36:43 +0000 (21:36 +0000)]
Reformat and 80-column this. It's not strictly conforming
yet, but it's better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 30 Oct 2012 20:52:40 +0000 (20:52 +0000)]
Fix PR14212: For some strange reason I treated vectors differently from
integers in that the code to handle split alloca-wide integer loads or
stores doesn't come first. It should, for the same reasons as with
integers, and the PR attests to that. Also had to fix a busted assert in
that this test case also covers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 20:39:19 +0000 (20:39 +0000)]
[inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167050
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 20:17:37 +0000 (20:17 +0000)]
BBVectorize: Cache fixed-order pairs instead of recomputing pointer info.
Instead of recomputing relative pointer information just prior to fusing,
cache this information (which also needs to be computed during the
candidate-pair selection process). This cuts down on the total number of
SE queries made, and also is a necessary intermediate step on the road toward
including shuffle costs in the pair selection procedure.
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167049
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 20:16:31 +0000 (20:16 +0000)]
[mips] Allow tail-call optimization for vararg functions and functions which
use the caller's stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 20:01:12 +0000 (20:01 +0000)]
Add a comment for r167040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167046
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 30 Oct 2012 19:49:39 +0000 (19:49 +0000)]
LoopIdiom: Fix a serious missed optimization: we only turned top-level loops into memmove.
Thanks to Preston Briggs for catching this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167045
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 19:47:37 +0000 (19:47 +0000)]
BBVectorize: Fix a small bug introduced in r167042.
We need to make sure that we take the correct load/store alignment
when the inputs are flipped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167044
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:37:25 +0000 (19:37 +0000)]
Add code for saving formal argument information to MipsFunctionInfo. This
information will be used by IsEligibleForTailCallOptimization to determine
whether a call can be tail-call optimized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167043
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 19:35:29 +0000 (19:35 +0000)]
BBVectorize: Simplify how input swapping is handled.
Stop propagating the FlipMemInputs variable into the routines that
create the replacement instructions. Instead, just flip the arguments
of those routines. This allows for some associated cleanup (not all
of which is done here). No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167042
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:23:25 +0000 (19:23 +0000)]
Add definition of function MipsTargetLowering::passArgOnStack which emits nodes
for passing a function call argument on a stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 19:11:54 +0000 (19:11 +0000)]
[inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.
Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://
12033048 and PR13504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:07:58 +0000 (19:07 +0000)]
Do not do tail-call optimization if target is mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167039
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 18:55:49 +0000 (18:55 +0000)]
BBVectorize: Don't make calls to SE when the result is unused.
SE was being called during the instruction-fusion process (when the result
is unreliable, and thus ignored). No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167037
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:37:43 +0000 (18:37 +0000)]
80-col
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167036
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:36:45 +0000 (18:36 +0000)]
LoopVectorize: Add support for write-only loops when the write destination is a single pointer.
Speedup SciMark by 1%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167035
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Tue, 30 Oct 2012 18:29:42 +0000 (18:29 +0000)]
PowerPC: Expand FSRQT for vector types
This patch expands FSQRT for floating point vector types when altivec is
used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167034
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:12:36 +0000 (18:12 +0000)]
LoopVectorize: Fix a bug in the initialization of reduction variables. AND needs to start at all-one
while XOR, and OR need to start at zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167032
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 30 Oct 2012 18:07:58 +0000 (18:07 +0000)]
Set %defaultjit to use MCJIT for PowerPC targets.
Update Transforms/LICM/2003-12-11-SinkingToPHI.ll test to use
%defaultjit as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167031
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Oct 2012 17:51:02 +0000 (17:51 +0000)]
Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167029
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 30 Oct 2012 17:33:39 +0000 (17:33 +0000)]
Enable ELF machine type to be specified explicitly in X86 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167027
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 30 Oct 2012 16:32:52 +0000 (16:32 +0000)]
Change ForceSizeOpt attribute into MinSize attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167020
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Oct 2012 16:03:32 +0000 (16:03 +0000)]
Fix isEliminableCastPair to work correctly in the presence of pointers
with different sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167018
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Oct 2012 15:11:52 +0000 (15:11 +0000)]
switch_to_lookup_table.ll: Remove some unnecessary lines, comments,
function attributes, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167016
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Tue, 30 Oct 2012 13:50:19 +0000 (13:50 +0000)]
PowerPC: More support for Altivec compare operations
This patch adds more support for vector type comparisons using altivec.
It adds correct support for v16i8, v8i16, v4i32, and v4f32 vector
types for comparison operators ==, !=, >, >=, <, and <=.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167015
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Oct 2012 13:38:54 +0000 (13:38 +0000)]
Add a helper for telling whether a type is a pointer or vector of pointer type.
Simplify the implementation of the corresponding integer and float functions and
move them inline while there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167014
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 30 Oct 2012 12:33:18 +0000 (12:33 +0000)]
Enable some additional constant folding for PPCDoubleDouble.
This fixes Clang :: CodeGen/complex-builtints.c on PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167013
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Oct 2012 11:23:25 +0000 (11:23 +0000)]
Use TargetTransformInfo to control switch-to-lookup table transformation
When the switch-to-lookup tables transform landed in SimplifyCFG, it
was pointed out that this could be inappropriate for some targets.
Since there was no way at the time for the pass to know anything about
the target, an awkward reverse-transform was added in CodeGenPrepare
that turned lookup tables back into switches for some targets.
This patch uses the new TargetTransformInfo to determine if a
switch should be transformed, and removes
CodeGenPrepare::ConvertLoadToSwitch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167011
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 02:41:57 +0000 (02:41 +0000)]
Remove an invalid assert in TargetTransformImpl
getCastInstrCost had an assert prohibiting scalar to vector casts. Such casts,
however, are allowed. This should make the vectorizer buildbot happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166998
91177308-0d34-0410-b5e6-
96231b3b80d8
Sid Manning [Tue, 30 Oct 2012 02:26:15 +0000 (02:26 +0000)]
* Add e_flags enum for Hexagon
* Add Hexagon specific section indexes for small data
- Reviewed by Michael Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166997
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Oct 2012 01:04:51 +0000 (01:04 +0000)]
ARM: Better disassembly for pc-relative LDR.
When the operand is a plain immediate rather than a label, print it
as [pc, #imm] like we do for the Thumb2 wide encoding variant.
rdar://
12154503
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166991
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 30 Oct 2012 00:54:49 +0000 (00:54 +0000)]
Change mips16 delay slot jumps to non delay slot forms by default.
We will make them delay slot forms if there is something that can be
placed in the delay slot during a separate pass. Mips16 extended instructions
cannot be placed in delay slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166990
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 00:40:39 +0000 (00:40 +0000)]
LoopVectorizer: change debug prints: Print the module identifier when deciding to vectorize. When deciding not to vectorize do not print the called function name because it can be null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166989
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 30 Oct 2012 00:01:57 +0000 (00:01 +0000)]
Re-commit r166971. I reverted it to quickly, when buildbots didn't have a chance
to test it with chapni's fix (-mattr=+avx).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166985
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 29 Oct 2012 23:27:20 +0000 (23:27 +0000)]
Fix ARM's b.w instruction for thumb 2 and the encoding T4. The branch target
is 24 bits not 20 and the decoding needed to correctly handle converting the
J1 and J2 bits to their I1 and I2 values to reconstruct the displacement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166982
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 23:13:50 +0000 (23:13 +0000)]
Revert r166971. It causes buildbot failure. To be investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166979
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 22:45:18 +0000 (22:45 +0000)]
llvm/test/CodeGen/X86/vec_shuffle-30.ll: Try to unbreak builds - assuming +avx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166974
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 22:04:32 +0000 (22:04 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166973
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 22:02:26 +0000 (22:02 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166972
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 21:56:35 +0000 (21:56 +0000)]
Allow to fold vector load if there is more than one bitcast, so in the case:
%0 = load <8 x i16>* %dest
%1 = shufflevector <8 x i16> %0, <8 x i16> %in,
<8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 13, i32 undef, i32 14, i32 14>
store <8 x i16> %1, <8 x i16>* %dest
We get:
vmovlpd (%eax), %xmm0, %xmm0
instead of:
vmovaps (%eax), %xmm1
vmovsd %xmm1, %xmm0, %xmm0
No extra test-case is added. I just fixed the existing one
(also it uses FileCheck now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166971
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 21:52:38 +0000 (21:52 +0000)]
LoopVectorize: Update and preserve the dominator tree info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166970
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 21:49:46 +0000 (21:49 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166969
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 29 Oct 2012 21:18:16 +0000 (21:18 +0000)]
This patch solves a problem with passing varargs parameters under the PPC64
ELF ABI.
A varargs parameter consisting of a single-precision floating-point value,
or of a single-element aggregate containing a single-precision floating-point
value, must be passed in the low-order (rightmost) four bytes of the
doubleword stack slot reserved for that parameter. If there are GPR protocol
registers remaining, the parameter must also be mirrored in the low-order
four bytes of the reserved GPR.
Prior to this patch, such parameters were being passed in the high-order
four bytes of the stack slot and the mirrored GPR.
The patch adds a new test case to verify the correct code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166968
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 29 Oct 2012 19:49:45 +0000 (19:49 +0000)]
Add mips64-* and mips64el-* triples to configure scripts
as valid triples denote Mips target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166961
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 29 Oct 2012 19:39:04 +0000 (19:39 +0000)]
Implement patterns for extloadi8 and extloadi16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166960
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:35:49 +0000 (18:35 +0000)]
In various places throughout the code generator, there were special
checks to avoid performing compile-time arithmetic on PPCDoubleDouble.
Now that APFloat supports arithmetic on PPCDoubleDouble, those checks
are no longer needed, and we can treat the type like any other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166958
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:18:44 +0000 (18:18 +0000)]
APFloat cleanup: Remove now unused "arithmeticOK" logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166954
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 29 Oct 2012 18:18:26 +0000 (18:18 +0000)]
Remove redundant test case from r166949, per Eli's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166953
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:17:42 +0000 (18:17 +0000)]
APFloat cleanup: Remove now unused fields "sign2" and "exponent2".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:09:01 +0000 (18:09 +0000)]
Implement arithmetic on APFloat with PPCDoubleDouble semantics by
treating it as if it were an IEEE floating-point type with 106-bit
mantissa.
This makes compile-time arithmetic on "long double" for PowerPC
in clang (in particular parsing of floating point constants)
work, and fixes all "long double" related failures in the test
suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166951
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 29 Oct 2012 18:01:54 +0000 (18:01 +0000)]
[ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] is
equivalent to [expr1 + expr2]. See test cases for more examples.
rdar://
12470392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166949
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 18:01:14 +0000 (18:01 +0000)]
Rename the BB-vectorize flag to match the dragonegg name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166948
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 29 Oct 2012 17:57:12 +0000 (17:57 +0000)]
Fix PR14204
- Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166947
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 29 Oct 2012 17:56:15 +0000 (17:56 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166945
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 29 Oct 2012 17:51:52 +0000 (17:51 +0000)]
Completely disallow partial copies in adjustCopiesBackFrom().
Partial copies can show up even when CoalescerPair.isPartial() returns
false. For example:
%vreg24:dsub_0<def> = COPY %vreg31:dsub_0; QPR:%vreg24,%vreg31
Such a partial-partial copy is not good enough for the transformation
adjustCopiesBackFrom() needs to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166944
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 17:49:34 +0000 (17:49 +0000)]
Allow i32/i64 for 'f' constraint on PowerPC.
This fixes PR12757.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166943
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 17:31:46 +0000 (17:31 +0000)]
Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
wrapper returns a vector of integers when passed a vector of pointers) by having
getIntPtrType itself return a vector of integers in this case. Outside of this
wrapper, I didn't find anywhere in the codebase that was relying on the old
behaviour for vectors of pointers, so give this a whirl through the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 29 Oct 2012 17:27:39 +0000 (17:27 +0000)]
Remove code to saturate profile counts.
We may need to change the way profile counter values are stored, but
saturation is the wrong thing to do. Just remove it for now.
Patch by Alastair Murray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166938
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 16:36:25 +0000 (16:36 +0000)]
Change the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166937
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 29 Oct 2012 16:26:52 +0000 (16:26 +0000)]
Minor style fixes for TargetTransformationInfo and TargetTransformImpl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166936
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 29 Oct 2012 16:16:54 +0000 (16:16 +0000)]
Expand all atomic ops for mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166935
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 16:07:28 +0000 (16:07 +0000)]
llvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166934
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:42 +0000 (15:51 +0000)]
PPCSubtarget.h: Add explicit braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166932
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:35 +0000 (15:51 +0000)]
PPCSubtarget.h: Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166931
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Mon, 29 Oct 2012 15:01:23 +0000 (15:01 +0000)]
This patch addresses a problem with the Post RA scheduler generating an
incorrect instruction sequence due to it not being aware that an
inline assembly instruction may reference memory.
This patch fixes the problem by causing the scheduler to always assume that any
inline assembly code instruction could access memory. This is necessary because
the internal representation of the inline instruction does not include
any information about memory accesses.
This should fix PR13504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166929
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 29 Oct 2012 14:59:36 +0000 (14:59 +0000)]
This patch adds alignment information for long double to the 64-bit PowerPC
ELF subtarget.
The existing logic is used as a fallback to avoid any changes to the Darwin
ABI. PPC64 ELF now has two possible data layout strings: one for FreeBSD,
which requires 8-byte alignment, and a default string that requires
16-byte alignment.
I've added a test for PPC64 Linux to verify the 16-byte alignment. If
somebody wants to add a separate test for FreeBSD, that would be great.
Note that there is a companion patch to update the alignment information
in Clang, which I am committing now as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166928
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 14:30:05 +0000 (14:30 +0000)]
Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,
just call getPointerTypeSizeInBits. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166926
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 14:12:44 +0000 (14:12 +0000)]
Loads and stores without an explicit alignment use the abi alignment not the
preferred alignment. Correct the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166925
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 12:19:04 +0000 (12:19 +0000)]
Rather than duplicating the getPointerSize code just call getPointerSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166923
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 11:29:53 +0000 (11:29 +0000)]
Silence a GCC warning about comparing signed and unsigned types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166922
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:07 +0000 (10:47 +0000)]
Align the data section correctly when loading an ELF file.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166920
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:04 +0000 (10:47 +0000)]
Make use of common-symbol alignment info in ELF loader.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166919
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:00 +0000 (10:47 +0000)]
Add interface for querying object files for symbol values.
Currently only implemented for ELF.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 29 Oct 2012 09:39:03 +0000 (09:39 +0000)]
va_start, va_end, va_copy: InstrinsicInst subclasses and InstVisitor support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166916
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 05:28:35 +0000 (05:28 +0000)]
Calling TLI->getNumRegisters creates a circular dependency when building LLVM using cmake.
Get the number of registers by calling getTypeLegalizationCost.
PR14199.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166911
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Oct 2012 04:57:52 +0000 (04:57 +0000)]
Remove unused typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166910
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 02:23:07 +0000 (02:23 +0000)]
Add -alias and -ralias options to match what we have for functions and
globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166909
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 01:59:03 +0000 (01:59 +0000)]
llvm-extract changes linkages so that functions on both sides of the
split module can see each other. If it is keeping a symbol that already has
a non local linkage, it doesn't need to change it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166908
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 00:27:55 +0000 (00:27 +0000)]
llvm-extract was unable to handle aliases. It would leave a copy on the
output of both
llvm-extract foo.ll -func=bar
and
llvm-extract foo.ll -func=bar -delete
so the two new files could not be linked together anymore. With this change
alias are handled almost like functions and global variables. Almost because
with alias we cannot just clear the initializer/body, we have to create a new
declaration and replace the alias with it.
The net result is that now the output of the above commands can be linked
even if foo.ll has aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166907
91177308-0d34-0410-b5e6-
96231b3b80d8