Commit Graph

63998 Commits

Author SHA1 Message Date
Chris Lattner
1a68958d3d we should pattern match the SSE complex arithmetic ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 23:31:42 +00:00
Bob Wilson
709d59255a Start converting NEON load/stores to use pseudo instructions, beginning here
with the VST4 instructions.  Until after register allocation, we want to
represent sets of adjacent registers by a single super-register.  These
VST4 pseudo instructions have a single QQ or QQQQ source register operand.
They get expanded to the real VST4 instructions with 4 separate D register
operands.  Once this conversion is complete, we'll be able to remove the
NEONPreAllocPass and avoid some fragile and hacky code elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 23:27:42 +00:00
John McCall
5b5f7260a0 Provide an explicit specialization of SmallVector at N=0 which does
not require its type argument to be complete if no members are
actually used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 23:11:24 +00:00
Chris Lattner
cd11e9db35 add a specialization for the MVT form of getTypeAction, since it is
trivial.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 23:05:45 +00:00
Chris Lattner
aafe626c7f remove some llvmcontext arguments that are now dead post-refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 23:00:45 +00:00
Chris Lattner
e6f7c267df Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by 
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 22:49:25 +00:00
Chris Lattner
e6e0018d3e tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 22:45:53 +00:00
Dan Gohman
ce934260dc Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 21:36:50 +00:00
Bruno Cardoso Lopes
3e60a232c1 Revert this for now, PUNPCKLDQ dont operate on v4f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112090 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 21:26:37 +00:00
Daniel Dunbar
3d6e4c3111 X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang -O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112089 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 21:11:02 +00:00
Devang Patel
ab43add695 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:41:24 +00:00
Devang Patel
78a06e50b7 Remove dead argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112085 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:39:26 +00:00
Jim Grosbach
c52b3cced8 Add some statistics for PEI register scavenging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112084 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:34:28 +00:00
Dan Gohman
064ff3e435 Add a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:23:38 +00:00
Dan Gohman
698138384e Fix the bitcode reader to clear out function-specific state
from MDValueList between each function, now that the bitcode
writer is reusing the index space for function-local metadata.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112082 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:22:53 +00:00
Dan Gohman
56e2a57744 Fix a bug found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:20:21 +00:00
Dan Gohman
6b9cb84f8c Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:17:19 +00:00
Benjamin Kramer
7b83c26051 MCELF: Use precomputed symbol indices, patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:09:43 +00:00
Eric Christopher
2177a04e24 Fix header define to reflect the name of the file.
Patch by Adam Treat!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112077 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:28:39 +00:00
Michael J. Spencer
bf252bef67 MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:27:27 +00:00
Jim Grosbach
f78ee6316b Don't override the var from the enclosing scope.
When doing copy/paste/modify, it's apparently rather important to remember
the 'modify' bit...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112075 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:11:34 +00:00
Chris Lattner
574aab5700 zap dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:00:00 +00:00
Devang Patel
1955cf1950 DIGlobalVariable can be used to encode debug info for globals that are directly folded into a constant by FE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 18:52:02 +00:00
Dan Gohman
92b06c2c06 lto_codegen_set_gcc_path was removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112069 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 18:37:04 +00:00
Dan Gohman
0586df2f25 Fix a few missing entries in lto.exports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 18:22:12 +00:00
Benjamin Kramer
fc19695c9a Remove dead recursive function. Yay for clang -Wunused-function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112060 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:27:58 +00:00
Dan Gohman
848c9aedd7 Clear FunctionLocalMDs in purgeFunction along with the rest of the
function-specific state.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:11:16 +00:00
Dan Gohman
5c18fa2736 Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:09:50 +00:00
Dan Gohman
879d811563 Eliminate an unnecessary cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:09:03 +00:00
Daniel Dunbar
3cc3283fcb ARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signed
comparison that would overflow.
 - The other under/overflow cases can't actually happen because the immediates
   which would trigger them are legal (so we don't enter this code), but
   adjusted the style to make it clear the transform is always valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 16:58:05 +00:00
Eric Christopher
0a0073daab Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112042 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 08:45:06 +00:00
Eric Christopher
b72573e5a6 Remove getsect checks, the result is unused and is broken anyhow.
Fixes PR7967.

Owen: You added these, any reason?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 08:44:54 +00:00
Eric Christopher
61c3f9ae06 Do type checks before we bother to do everything else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 08:43:57 +00:00
Eric Christopher
c430223677 Add another basic test cribbed from the x86 fast-isel tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:57:29 +00:00
Eric Christopher
e8d274c8c9 Run this on thumb and arm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:53:15 +00:00
Anton Korobeynikov
9f7f83b861 Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove
other flags-clobberring stuff (e.g. cmp instructions) occuring after
_alloca call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:50:11 +00:00
Eric Christopher
dc3d8b812f Make this testcase actually executed with fast-isel on arm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:47:00 +00:00
Eric Christopher
b1cc848d1a Reorganize load mechanisms. Handle types in a little less fixed way.
Fix some todos.  No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:23:49 +00:00
Eric Christopher
91e7fb7b1b Apparently this is needed for llvm-link to link.
Untested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 06:45:22 +00:00
Eric Christopher
53452606ca Allow strict subclasses of register classes, this way we can handle
ARM instructions with:

foo GPR, rGPR

which happens a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 04:58:56 +00:00
Daniel Dunbar
7226a0eb52 buildbot/valgrind: Ignore leaks in /usr/bin/as.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112022 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 03:40:20 +00:00
Bruno Cardoso Lopes
f76c55aa40 PUNPCKLDQ should also be used for v4f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 02:55:40 +00:00
Bruno Cardoso Lopes
7338bbd32a teach lowering to get target specific nodes for pshufd, emulating the same isel behavior for now, so we can pass all vector shuffle tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 02:35:37 +00:00
Bruno Cardoso Lopes
ddd10affab Convert test to use filecheck and make it more specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112016 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 01:47:16 +00:00
Owen Anderson
6cd2075549 In the default address space, any GEP off of null results in a trap value if you try to load it. Thus,
any load in the default address space that completes implies that the base value that it GEP'd from
was not null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 01:16:47 +00:00
Eric Christopher
a2c9188560 Split out register class subclassing to a separate function and clean up
accordingly.  No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:41:18 +00:00
Eric Christopher
2cfcad97b7 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:21:59 +00:00
Dan Gohman
7548fb37f1 Don't include the is-function-local bit in the FoldingSetNodeID
for MDNodes, since this information is effectively implied by
the operands. This allow allows the code to avoid doing a
recursive is-it-really-function-local check in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:21:12 +00:00
Chris Lattner
3ac1884509 split the vector case of getCopyFromParts out to its own function,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:20:40 +00:00
Dan Gohman
365c53e328 Use Bits.data() instead of &Bits[0].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:16:53 +00:00