Commit Graph

8066 Commits

Author SHA1 Message Date
Andreas Neustifter
ca172ae477 Removed temporarily because of breaking Darwin builds.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086214.html)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 16:47:24 +00:00
Andreas Neustifter
793d4a8467 Changed profiling-tool-chain.ll test to use optimal-edge-profiling instead of
edge-profiling, this is more useful since the loading of the
optimal-edge-profiling is more complicated.
The edge-profiling is tested in edge-profiling.ll where only the
instrumentation is tested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 14:24:08 +00:00
Torok Edwin
148843b0ce Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 11:13:56 +00:00
Chris Lattner
25f1992cf5 Fix month.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80769 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 06:34:22 +00:00
Chris Lattner
40ef630a46 fix PR4815: some cases where DeleteDeadInstruction can delete
the instruction BBI points to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 06:31:02 +00:00
Chris Lattner
f19f9347b8 fix PR4848 an infinite loop when indexing down through a recursive gep
and we get the original pointer type.  This doesn't mean that we're
at the first pointer being indexed.  Correct the predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 05:35:45 +00:00
Chris Lattner
9e17b632ec fix PR4837, some bugs folding vector compares. These
return a vector of i1, not i1 itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 05:12:37 +00:00
Daniel Dunbar
545898183e Don't force the triple or data layout in this test. We just have to get them
from the host and hope that works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 02:43:11 +00:00
Bob Wilson
8a3198b770 Add support for generating code for vst{234}lane intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 18:51:56 +00:00
Bob Wilson
2af658fcc0 Fix incorrect declarations of intrinsics in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 18:50:43 +00:00
Chris Lattner
f41eaacee4 enhance memcpy opt to turn memmoves into memcpy when the src/dest
don't alias.  Remove an old and poorly reduced testcase that fails
with this transform for reasons unrelated to the original test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80693 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 17:56:32 +00:00
Chris Lattner
9535b31483 testcase for PR3601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 06:33:49 +00:00
Chris Lattner
a541b0fde2 Change CallGraphNode to maintain it's Function as an AssertingVH
for sanity.  This didn't turn up any bugs.

Change CallGraphNode to maintain its "callsite" information in the 
call edges list as a WeakVH instead of as an instruction*.  This fixes
a broad class of dangling pointer bugs, and makes CallGraph have a number
of useful invariants again.  This fixes the class of problem indicated
by PR4029 and PR3601.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 06:31:31 +00:00
Bob Wilson
c011005912 Add test for vld{234}_lane instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 04:27:10 +00:00
Bob Wilson
71124f698b Fix pr4843: When an instruction has multiple destination registers that are
tied to different source registers, the TwoAddressInstructionPass needs to
be smarter.  Change it to check before replacing a source register whether
that source register is tied to a different destination register, and if so,
defer handling it until a subsequent iteration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 04:18:40 +00:00
Jim Grosbach
46e0faa81c SJLJ is arm/darwin only for now. force the triple for the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 02:34:49 +00:00
Jim Grosbach
3fb2b1ede3 Clean up LSDA name generation and use for SJLJ exception handling. This
makes an eggregious hack somewhat more palatable. Bringing the LSDA forward
and making it a GV available for reference would be even better, but is
beyond the scope of what I'm looking to solve at this point.

Objective C++ code could generate function names that broke the previous
scheme. This fixes that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 01:57:56 +00:00
David Goodwin
a3251db21a Don't mark a register live at an undef use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 20:47:02 +00:00
Evan Cheng
029599bf01 Remove .n suffix for some 16-bit opcodes now that Darwin assembler is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 20:14:07 +00:00
Dale Johannesen
a5fd5b86f6 Fix some misspellings of XTARGET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 18:05:23 +00:00
Dale Johannesen
249c93e15f Mark test as passing on all x86, which it should,
although I don't think anyone cares about this
feature except Darwin.  PR 4825.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 17:49:20 +00:00
Daniel Dunbar
821e3334ed llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 08:09:28 +00:00
Daniel Dunbar
e2ace509fc llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 08:09:09 +00:00
Daniel Dunbar
8c2eebe407 llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.
Also, use MCInst::print instead of custom code in MCAsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 08:08:38 +00:00
Chris Lattner
46ca76f6bb fix a crash building SPASS by tolerating a callsite that doesn't exist
in the callgraph, see the big comment at the top of the testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 05:46:59 +00:00
Chris Lattner
95afdfee82 fix a bug I introduced with my 'instcombine builder' refactoring
changes: SimplifyDemandedBits can't use the builder yet because it
has the wrong insertion point.  This fixes a crash building
MultiSource/Benchmarks/PAQ8p


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 04:36:22 +00:00
Chris Lattner
b374b90e81 Fix PR4834, a tricky case where the inliner would resolve an
indirect function pointer, inline it, then go to delete the body.
The problem is that the callgraph had other references to the function,
though the inliner had no way to know it, so we got a dangling pointer
and an invalid iterator out of the deal.

The fix to this is pretty simple: stop the inliner from deleting the
function by knowing that there are references to it.  Do this by making
CallGraphNodes contain a refcount.  This requires moving deletion of 
available_externally functions to the module-level cleanup sweep where
it belongs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 03:15:49 +00:00
Chris Lattner
0665552c61 rename test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 22:14:17 +00:00
Chris Lattner
409255e329 merge all sinking tests into one and convert them to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 22:13:26 +00:00
Chris Lattner
7025264add convert scalar_promote to filecheck style and merge 2003-12-13-VolatilePromote.ll into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 22:08:19 +00:00
Chris Lattner
251829ed87 eliminate some uses of prcontext. Any help here would be appreciated :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:45:23 +00:00
Chris Lattner
b2e673c563 rename test so that name reflects what it is testing for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:36:39 +00:00
Chris Lattner
aaf615951c convert to filecheck format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:36:06 +00:00
Chris Lattner
4007241607 suck a bunch more gep tests into getelementptr.ll and filecheckize them all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:31:34 +00:00
Chris Lattner
ad5b15379e consolodate various GEP tests into getelementptr.ll using filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:02:36 +00:00
Chris Lattner
d0585ffed1 another huge testcase, this time from 'gs' in llvm-test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:02:02 +00:00
Chris Lattner
f966e53e86 remove another poorly-reduced testcase which came from ldecod in llvm-test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:01:14 +00:00
Chris Lattner
650e821626 this testcase is 500 lines long and is distilled from bzip2, just
remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 21:00:11 +00:00
Chris Lattner
e30f0b7d89 convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 20:48:15 +00:00
Chris Lattner
2de2319124 Fix PR4748: don't fold gep(bitcast(x)) into bitcast(gep) when x
is itself a bitcast.  Since we have gep(bitcast(bitcast(y))) in this
case, just wait for the two bitcasts to get zapped.  This prevents
instcombine from confusing some aliasing stuff, and allows it to
directly eliminate the load in the testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 20:38:21 +00:00
Anton Korobeynikov
d91aafd005 Add missed pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 19:06:39 +00:00
Anton Korobeynikov
b00c03bb35 EXTRACT_VECTOR_ELEMENT can have result type different from element type.
Remove the assertion and generalize the code for ARM NEON stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 17:14:54 +00:00
Daniel Dunbar
3a3cb6c59e Update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 07:01:09 +00:00
Daniel Dunbar
7092c7e1dc llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.
- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-30 06:17:16 +00:00
Dan Gohman
71a258c36b CMOV_GR8 clobbers EFLAGS when its expansion involves an xor to set
a register to 0. This fixes PR4814.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-29 22:19:15 +00:00
Anton Korobeynikov
71624cc786 Do not assert on too wide splats we don't support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80409 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-29 00:08:18 +00:00
Anton Korobeynikov
2324bdc1ee Add missed extract_element pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 23:41:26 +00:00
Devang Patel
e4b275610a Reapply 79977.
Use MDNodes to encode debug info in llvm IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 23:24:31 +00:00
Evan Cheng
e4e4ed3b56 Let Darwin linker auto-synthesize stubs and lazy-pointers. This deletes a bunch of nasty code in ARM asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 23:18:09 +00:00
Torok Edwin
1cb2de3188 rm needs -f
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 14:05:07 +00:00
Torok Edwin
0debb15baf Remove the llvmprof.out from the test output, otherwise running
make check in a non-clean directory causes it to fail (for example when running
make check twice), since execution counts will differ.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 13:35:44 +00:00
Andreas Neustifter
1896727eae Remove profiling output file because two consecutive runs of make check give
error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 10:38:26 +00:00
Andreas Neustifter
cf4f7199c9 Removed unnecessary file creation during test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 10:07:41 +00:00
Andreas Neustifter
82fdcede12 Pulled all tests into one test. Removed some redundant tests. Rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 10:00:28 +00:00
Daniel Dunbar
8f4d146c34 llvm-mc: Support .comm emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 07:08:35 +00:00
Andreas Neustifter
798261ccf5 Readded test from r79615, this tests the complete profiling tool chain. Furhter
tests can test only parts of this system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 06:41:00 +00:00
Daniel Dunbar
d5a8e98ef6 llvm-mc: Support .zerofill emission.
- I'm still trying to figure out the cleanest way to implement this and match the assembler, currently there are some substantial differences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 05:49:21 +00:00
Daniel Dunbar
e6cdbf2f92 llvm-mc: Emit .lcomm as .zerofill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 05:48:46 +00:00
Chris Lattner
de64894dc3 Fix PR3913, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 00:43:14 +00:00
Evan Cheng
0e87e23f6e v4, v5 does not support sxtb / sxth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 00:31:43 +00:00
Anton Korobeynikov
2a82a7aa60 scalar_to_vector is fully legal now (implemented as subreg accesses)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 16:04:47 +00:00
Anton Korobeynikov
3a0f1b3ed0 Ok, sometimes it's profitable to turn scalar_to_vector stuff into subreg access.
Add a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 14:51:42 +00:00
Chris Lattner
199ba42cbf Implement a new optimization in the inliner: if inlining multiple
calls into a function and if the calls bring in arrays, try to merge
them together to reduce stack size.  For example, in the testcase
we'd previously end up with 4 allocas, now we end up with 2 allocas.

As described in the comments, this is not really the ideal solution
to this problem, but it is surprisingly effective.  For example, on
176.gcc, we end up eliminating 67 arrays at "gccas" time and another
24 at "llvm-ld" time.

One piece of concern that I didn't look into: at -O0 -g with
forced inlining this will almost certainly result in worse debug
info.  I think this is acceptable though given that this is a case
of "debugging optimized code", and we don't want debug info to
prevent the optimizer from doing things anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:29:33 +00:00
Chris Lattner
ff517d1ecd the inliner shouldn't crash on this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:20:45 +00:00
Daniel Dunbar
b1126e6f4a For now, only run MC tests if X86 is configured.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:11:15 +00:00
Bill Wendling
5082ad628f This is passing for PPC on Mac OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 05:49:50 +00:00
Evan Cheng
cdbb3f5d33 Fix PR4789. Teach eliminateFrameIndex how to handle VLDRQ and VSTRQ which cannot fold any immediate offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 01:23:50 +00:00
Dan Gohman
7e7f06e70a X86FastISel support for loading and storing values of type i1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 00:31:47 +00:00
Dan Gohman
cbbea0ffc7 Expand i8 selects into control flow instead of 16-bit conditional
moves. This avoids the need to promote the operands (or implicitly
extend them, a partial register update condition), and can reduce
i8 register pressure. This substantially speeds up code such as
write_hex in lib/Support/raw_ostream.cpp.

subclass-coalesce.ll is too trivial and no longer tests what it was
originally intended to test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 00:14:12 +00:00
Daniel Dunbar
7c0a3348fb llvm-mc/Mach-O: Unique sections properly, so we don't get duplicate text
sections, etc.
 - The quick and dirty way, just clone the TargetLoweringObjectFile
   code. Eventually this should be shared... somehow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:49:51 +00:00
Daniel Dunbar
959fd88334 llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
- I moved section creation back into AsmParser. I think policy decisions like
   this should be pushed higher, not lower, when possible (in addition the
   assembler has flags which change this behavior, for example).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:13:22 +00:00
Daniel Dunbar
6009db486e llvm-mc/Mach-O: Set .subsections_via_symbols flag properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 21:22:22 +00:00
Bob Wilson
e4696cf03d Convert some more Neon tests to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:11:50 +00:00
Dale Johannesen
4e68f8803d Alter 79292 to produce output that actually assembles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:10:32 +00:00
Anton Korobeynikov
1cb852b0ea Expand scalar_to_vector - we don't have any isel logic for it now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 16:26:09 +00:00
Dan Gohman
af70e5c676 Don't use INSERT_SUBREG to model anyext operations on x86-64, as it
leads to partial-register definitions. To help avoid redundant
zero-extensions, also teach the h-register matching patterns that
use movzbl to match anyext as well as zext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 14:59:13 +00:00
Dan Gohman
2385e0e22c Create a ScalarEvolution-based AliasAnalysis implementation.
This is a simple AliasAnalysis implementation which works by making
ScalarEvolution queries. ScalarEvolution has a more complete understanding
of arithmetic than BasicAA's collection of ad-hoc checks, so it handles
some cases that BasicAA misses, for example p[i] and p[i+1] within the
same iteration of a loop.

This is currently experimental. It may be that the main use for this pass
will be to help find cases where BasicAA can be profitably extended, or
to help in the development of the overall AliasAnalysis infrastructure,
however it's also possible that it could grow up to become a directly
useful pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 14:53:06 +00:00
Daniel Dunbar
3f6a960f9c llvm-mc/Mach-O: Add support for relocations.
- I haven't really tried to find the "right" way to store the fixups or apply
   them, yet. This works, but isn't particularly elegant or fast.

 - Still no evaluation support, so we don't actually ever not turn a fixup into
   a relocation entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 13:58:10 +00:00
Daniel Dunbar
6c2e2d1c6b llvm-mc/Mach-O: Dump relocations and section data (optionally) in my Mach-O dumper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 13:57:44 +00:00
Anton Korobeynikov
cd76128f18 Add dummy inline asm handling for 'r' constraint. This fixes PR4778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 13:44:29 +00:00
Devang Patel
8245988835 Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 05:01:18 +00:00
Daniel Dunbar
573e53627e llvm-mc: Fix tests for python variations in int printing, sigh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 04:28:45 +00:00
Daniel Dunbar
6742e34385 llvm-mc/Mach-O: Add section padding where needed (to align the next section).
Also, simplify some of Mach-O writer code which can now use section addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 04:13:32 +00:00
Daniel Dunbar
5e835967dd llvm-mc/Mach-O: Set addresses for symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 02:48:04 +00:00
Daniel Dunbar
ad7c3d5593 llvm-mc: Improve indirect symbol support (add the indirect index table).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 00:18:21 +00:00
Scott Michel
77f452d1a8 Updated i128 sext support for CellSPU backend, contributed by Ken Werner (IBM)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:37:34 +00:00
Chris Lattner
67e7ba8fc2 remove some dead lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 21:01:56 +00:00
Chris Lattner
447da71345 convert to filecheck style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 20:57:38 +00:00
Chris Lattner
0765ce66be convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 20:49:04 +00:00
Daniel Dunbar
3ff36b7814 Switch abi-isel.ll to FileCheck; it's not much faster, but it now tests a lot
more and is much nicer to the OS.
 - Dan, please check. If there are parts of the test you think I should strip
   out so it doesn't cause random failures let me know (there are still some PIC
   label numbers in it, for example).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 18:45:03 +00:00
Dan Gohman
76f497a351 Special-case static allocas in IndVarSimplify's loop invariant
sinking code, since they are special. If the loop preheader happens
to be the entry block of a function, don't sink static allocas
out of it. This fixes PR4775.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 17:42:10 +00:00
David Goodwin
88a589c4b3 Fixup register kills after scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 17:03:05 +00:00
Anton Korobeynikov
379a087cc7 Provide dynamic_stackalloc lowering for MSP430.
This fixes PR4769

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 17:00:23 +00:00
Torok Edwin
b157e70a68 Remove target triple from this test, it fails on x86-64 with
--enable-targets=host-only otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 16:53:15 +00:00
Dan Gohman
47dd94e542 Fix a few typos from the removal of -f.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:45:44 +00:00
Dan Gohman
fea1dd0804 Remove obsolete -f flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:38:29 +00:00
Devang Patel
2a610c7387 Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 05:24:07 +00:00
Dale Johannesen
f6163dc856 Fix PR 4751, another difficulty with %a modifier on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 00:16:14 +00:00
Scott Michel
f6045fe8c4 - Remove SelectSEXTi128 from SPUISelDAGToDAG.cpp, evidently, this is redundant
code, according to Anton (I'm not totally convinced, but we can always
  resurrect patches if we need to do so.)
- Start moving CellSPU's tests to prefer FileCheck.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 23:57:35 +00:00
Scott Michel
838dbd92d8 Prefer 'FileCheck' over 'grep'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 22:49:22 +00:00
Scott Michel
f1fa4fd282 128-bit sign extension and vector shift cleanups, contributed by Ken Werner
(IBM).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 22:28:53 +00:00
Bob Wilson
81fece667e Fix a typo. Somehow I thought this had passed before, but I guess not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 21:17:17 +00:00
Bob Wilson
ef63f70794 Convert slow test to use FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79935 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 20:33:47 +00:00
Daniel Dunbar
d60054e512 Convert two gratuitous abuses of poor helpless CPU cycles to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 20:08:27 +00:00
Dale Johannesen
a3f2b21aff Split test into 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 17:51:19 +00:00
Daniel Dunbar
6aff2fbd56 llvm-mc/Mach-O: Support symbol attributes.
- This is mostly complete, the main thing missing is .indirect_symbol support
   (which would be straight-forward, except that the way it is implemented in
   'as' makes getting an exact .o match interesting).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79899 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 08:40:12 +00:00
Chris Lattner
7e824a394b Remove this test now that the interpreter doesn't support
interpreting the wrong endianness anymore.  This fixes a 
failure on clang-powerpc-darwin8


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 02:05:59 +00:00
Dale Johannesen
a60e51f7e8 Make linkerprivate work for ARM and PPC. Testcase covers
all Darwin targets; could be split into separate tests for
the chip subdirectories, but from Chris' last mail on testing
I assume he'd rather have only one test.  Generic seems to be
the best available, maybe there should be a Darwin subdirectory?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 01:03:42 +00:00
Chris Lattner
2a8d194cce remove this test: it is testing for a "feature" I just removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 23:01:02 +00:00
Daniel Dunbar
67f99986fa Rerevert (r75663 and r76805), seems there is more non-determinism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 17:26:24 +00:00
Jakob Stoklund Olesen
46ff969ca6 Fix PR4753.
When undoing a reuse in ReuseInfo::GetRegForReload, check if it was only a
sub-register being used. The MachineOperand::getSubReg() method is only valid
for virtual registers, so we have to recover the sub-register index manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 13:01:45 +00:00
Daniel Dunbar
895ae9b30d Speculatively revert r76823 (i.e., reapply r75663 and r76805) to see if the real
problem is fixed by the TableGen determinism fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 10:44:51 +00:00
Daniel Dunbar
3edd9bb7a3 llvm-mc/Mach-O: Improve symbol table support:
- Honor .globl.

 - Set symbol type and section correctly ('nm' now works), and order symbols
   appropriately.

 - Take care to the string table so that the .o matches 'as' exactly (for ease
   of testing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 11:41:10 +00:00
Daniel Dunbar
d889ac3b56 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 10:09:17 +00:00
Daniel Dunbar
605187e596 Force triple for these tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 09:45:43 +00:00
Daniel Dunbar
8333a8aea3 llvm-mc: Hopefully fix Mach-O tests on big-endian platforms, force values to be
converted to Python ints if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 09:28:33 +00:00
Daniel Dunbar
8906ff1b9d llvm-mc: Clean up some handling of symbol/section association to be more correct
(external was really undefined and there wasn't an explicit representation for
absolute symbols).
 - This still needs some cleanup to how the absolute "pseudo" section is dealt
   with, but I haven't figured out the nicest approach yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 07:22:36 +00:00
Eli Friedman
ce392eb3ea Make x86 test actually test x86 code generation. Fix the
construct on ARM, which was breaking by coincidence, and add a similar 
testcase for ARM.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 03:13:10 +00:00
Chris Lattner
934a7567cb rename test, make more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79712 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 00:44:24 +00:00
Anton Korobeynikov
d99dda22f4 Add missing RUN line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 00:28:50 +00:00
Anton Korobeynikov
65a3788694 Reduce the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 00:18:11 +00:00
Bob Wilson
b6c68f9e74 Use CHECK-NEXT to make sure we're only getting one copy of each shuffle
instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 00:13:23 +00:00
Daniel Dunbar
2330df6b66 llvm-mc: Improve handling of implicit alignment for magic section directives
(e.g., .objc_message_refs).
 - Just emit a .align when we see the directive; this isn't exactly what 'as'
   does but in practice it should be ok, at least for now. See FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:30:15 +00:00
Daniel Dunbar
d6f761e0eb llvm-mc/Mach-O: Support .o emission for .org and .align.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:07:38 +00:00
Bob Wilson
c692cb77aa Match VTRN, VZIP, and VUZP shuffles. Restore the tests for these operations,
now using shuffles instead of intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 20:54:19 +00:00
Anton Korobeynikov
162da3c7b4 Add fcopysign instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 20:02:37 +00:00
Daniel Dunbar
0705fbf52f llvm-mc/Mach-O: Support byte and fill value emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 18:29:01 +00:00
Anton Korobeynikov
3c2734c82b Handle 'r' inline asm constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 18:15:41 +00:00
Dan Gohman
cda9706cb7 Change getelementptr folding to use APInt instead of uint64_t for
offset computations. This fixes a truncation bug on targets that
don't have 64-bit pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 16:52:54 +00:00
Bob Wilson
3b83287c4e Add some tests for vext.16 and vext.32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 16:35:24 +00:00
Daniel Dunbar
bc38ca7321 llvm-mc: Accept .fill size of 8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 15:43:35 +00:00
Andreas Neustifter
4678c2d438 Removed profiling test, lli not available on all platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 15:27:35 +00:00
Andreas Neustifter
e879bdad49 Added tests for Profiling Infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 09:36:28 +00:00
Bill Wendling
5ee9c46391 Make for 32-bit only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 09:29:26 +00:00
Daniel Dunbar
fb4a6b3976 llvm-mc: Start MCAssembler and MCMachOStreamer.
- Together these form the (Mach-O) back end of the assembler.

 - MCAssembler is the actual assembler backend, which is designed to have a
   reasonable API. This will eventually grow to support multiple object file
   implementations, but for now its Mach-O/i386 only.

 - MCMachOStreamer adapts the MCStreamer "actions" API to the MCAssembler API,
   e.g. converting the various directives into fragments, managing state like
   the current section, and so on.

 - llvm-mc will use the new backend via '-filetype=obj', which may eventually
   be, but is not yet, since I hear that people like assemblers which actually
   assemble.

 - The only thing that works at the moment is changing sections. For the time
   being I have a Python Mach-O dumping tool in test/scripts so this stuff can
   be easily tested, eventually I expect to replace this with a real LLVM tool.

 - More doxyments to come.

I assume that since this stuff doesn't touch any of the things which are part of
2.6 that it is ok to put this in not so long before the freeze, but if someone
objects let me know, I can pull it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 09:11:24 +00:00
Bill Wendling
6e3b787f1d Probably should emit bitcode instead of text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 08:02:19 +00:00
Bill Wendling
f7a86a4e1d Testcase for r79597.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 06:12:30 +00:00
Bob Wilson
d4b4cf524b Remove Neon intrinsics for VZIP, VUZP, and VTRN. We will represent these as
vector shuffles.  Temporarily remove the tests for these operations until the
new implementation is working.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 00:01:42 +00:00
Dale Johannesen
a70872e15e Use FileCheck even though this means testing for something
that has nothing to do with the point of the test, per Chris.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 22:12:08 +00:00
Dan Gohman
ef74e9bf2a Fix an x86 code size regression: prefer RIP-relative addressing
over absolute addressing even in non-PIC mode (unless the address
has an index or something else incompatible), because it has a
smaller encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 18:23:44 +00:00
Evan Cheng
89d177f017 Fix an obvious copy-n-paste bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:01:04 +00:00
Dale Johannesen
4caadc3ae0 Use FileCheck for the test run where it's appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 16:58:04 +00:00
Dan Gohman
7a7be366a7 Loosen up the regex for this test so that it doesn't implicitly
depend on TargetData information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:19:36 +00:00
Dan Gohman
600d52c6af Add targetdata strings to these tests, since SimplifyLibCalls uses
TargetData to find the pointer size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:18:49 +00:00
Dan Gohman
3d01334e6f Fix a bug in the over-index constant folding. When over-indexing an
array member of a struct, it's possible to land in an arbitrary position
inside that struct, such that attempting to find further getelementptr
indices will fail. In such cases, folding cannot be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:46:59 +00:00
Dale Johannesen
7bcec7e541 Handle 'a' modifier in X86 asms. PR 4742.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:44:41 +00:00
Bill Wendling
ef01ab0973 Make this test platform neutral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:51:45 +00:00
Daniel Dunbar
c21d5883ac Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:35:54 +00:00
Dan Gohman
de0e587e63 Canonicalize indices in a constantexpr GEP. If Indices exceed the
static extents of the static array type, it causes GlobalOpt and
other passes to be more conservative. This canonicalization also
allows the constant folder to add "inbounds" to GEPs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:18:36 +00:00
Dan Gohman
6a402dc952 Add an x86 peep that narrows TEST instructions to forms that use
a smaller encoding. These kinds of patterns are very frequent in
sqlite3, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:16:17 +00:00
Erick Tryzelaar
b02b878827 Convert the rest of the ocaml types and functions to use context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 17:32:24 +00:00
Bob Wilson
de95c1b88b Add support for Neon VEXT (vector extract) shuffles.
This is derived from a patch by Anton Korzh.  I modified it to recognize
the VEXT shuffles during legalization and lower them to a target-specific
DAG node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 17:03:43 +00:00
Eli Friedman
d68eea2b6d PR4737: Fix a nasty bug in load narrowing with non-power-of-two types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 08:46:10 +00:00
Nick Lewycky
08368ce984 Fix up PHI nodes correctly in the presence of unreachable BBs, part two. Also
delete a newed pointer, and improve readability a little bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 07:16:57 +00:00
Erick Tryzelaar
5371aa2a1c Allow passing around LLVMContext in ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 06:40:29 +00:00
Chris Lattner
6e579c6727 fix asmstreaming of 2/4 byte elements with pow-2 alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 06:35:36 +00:00
Dan Gohman
107f41fad5 Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
before performing optimizations based on constant string values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 00:11:12 +00:00
Dan Gohman
db8dc2b9fa Legalize the shift amount operand of SRL_PARTS, SHL_PARTS, and
SRA_PARTS, as is done for SRL, SHL, and SRA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79380 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 23:36:17 +00:00
Richard Osborne
1123135dbf Add support for mergeable sections back into the XCore backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:14:31 +00:00
Richard Osborne
a9e8334877 Put data with relocations in the same sections as data without relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 17:58:17 +00:00
Daniel Dunbar
daf4f0ca61 Attempt to normalize test results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79350 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 17:38:27 +00:00
Dan Gohman
9ae003d334 Make this test less sensitive to assembler differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 17:19:46 +00:00
Chris Lattner
755baa8329 force a triple so this passes on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79345 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 16:55:45 +00:00
Dan Gohman
c40f17b087 Generalize ScalarEvolution to be able to analyze GEPs when
TargetData is not present. It still uses TargetData when available.
This generalization also fixed some limitations in the TargetData
case; the attached testcase covers this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 16:46:41 +00:00
Dan Gohman
da65822cfc Make tail merging handle blocks with repeated predecessors correctly, and
remove RemoveDuplicateSuccessor, as it is no longer necessary, and because
it breaks assumptions made in
MachineBasicBlock::isOnlyReachableByFallthrough.

Convert test/CodeGen/X86/omit-label.ll to FileCheck and add a testcase
for PR4732.

test/CodeGen/Thumb2/thumb2-ifcvt2.ll sees a diff with this commit due to
it being bugpoint-reduced to the point where it doesn't matter what the
condition for the branch is.

Add some more interesting code to
test/CodeGen/X86/2009-08-06-branchfolder-crash.ll, which is the testcase
that originally motivated the RemoveDuplicateSuccessor code, to help
verify that the original problem isn't being re-broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79338 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 15:18:18 +00:00
Dan Gohman
6874a2ae03 Fix a bug that caused globalopt to miscompile tramp3d: don't miss
unruly indices for arrays that are members of structs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 14:58:19 +00:00
Evan Cheng
51f39961c3 Fix revsh pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 05:43:23 +00:00
Anton Korobeynikov
e55db74152 The attached patches attempt to fix cross builds. For example, if you
try to use i686-darwin to build for arm-eabi, you'll quickly run into
several false assumptions that the target OS must be the same as the
host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to
help builds like "make check" and the test-suite able to cross
compile. Along the way a target of *-unknown-eabi is defined as
"Freestanding" so that TARGET_OS checks have something to work with.

Patch by Sandeep Patel!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:40:33 +00:00
Dale Johannesen
5cfd4ddece PowerPC inline asm was emitting two output operands
for a single "m" constraint; this is wrong because the
opcode of a load or store would have to change in parallel.
This patch makes it always compute addresses into a register,
which is correct but not as efficient as possible.  7144566.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:18:39 +00:00
Devang Patel
4b49cd298a Add prefix only if it is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 23:17:17 +00:00
Nick Lewycky
5fe01f4e4b Test the pass the test is actually for, instead of one that doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 17:41:29 +00:00
Nick Lewycky
a10e89f372 Don't crash on critical edge. Patch by Andre Tavares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 17:00:57 +00:00
Richard Osborne
2a5e23b44d Update getSectionForConstant() to to allow mergable sections to be nulled out
if not supported by the ELF subtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 16:37:11 +00:00
Duncan Sands
afc4940466 XFAIL this test since the fix was reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 12:20:45 +00:00
Nick Lewycky
5321debc86 Add a test that shows that SSI is working correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 07:32:08 +00:00
Nick Lewycky
d3aa25e2a8 Don't crash trying to promote VLAs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 05:37:31 +00:00
Erick Tryzelaar
45d6ac2cc1 Expose creating constant ints and floats from strings to ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 23:37:03 +00:00
Eli Friedman
12bb766ae9 Fix for PR3016: detect the tricky case, where there are
unfoldable references to a PHI node in the block being folded, and disable
the transformation in that case.  The correct transformation of such PHI
nodes depends on whether BB dominates Succ, and dominance is expensive 
to compute here.  (Alternatively, it's possible to check whether any 
uses are live, but that's also essentially a dominance calculation. 
Another alternative is to use reg2mem, but it probably isn't a good idea to
use that in simplifycfg.)

Also, remove some incorrect code from CanPropagatePredecessorsForPHIs 
which is made unnecessary with this patch: it didn't consider the case 
where a PHI node in BB has multiple uses.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 04:23:49 +00:00
Eli Friedman
51fe650c58 Fix test on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 21:28:17 +00:00
Bill Wendling
af56634058 Reapply r79127. It was fixed by d0k.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 21:21:19 +00:00
Bill Wendling
f865ea85bd Revert r79127. It was causing compilation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 21:14:01 +00:00
Nick Lewycky
071d84e109 SSI construction should just go ahead and ignore instructions in unreachable
blocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 20:12:18 +00:00
Evan Cheng
088880cb19 Change allowsUnalignedMemoryAccesses to take type argument since some targets
support unaligned mem access only for certain types. (Should it be size
instead?)

ARM v7 supports unaligned access for i16 and i32, some v6 variants support it
as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 19:23:44 +00:00
Chris Lattner
5dafafdeb4 implement support for CHECK-NEXT: in filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 18:32:21 +00:00
Jakob Stoklund Olesen
16b794d25a Refine EarlyClobber assert in register scavenger.
It is legal for an inline asm operand to use an earlyclobber register if the
use operand is tied to the earlyclobber operand. The issue is discussed here:

  http://gcc.gnu.org/ml/gcc/1999-04n/msg00431.html

We should perhaps let only the machine code verifier worry about these finer
details. EarlyClobber operands are not really interesting to the scavenger.

This fixes PR4528 for the third time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 18:16:58 +00:00
Chris Lattner
d04fee1e2b specify a target triple so global variable manglings are consistent etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:35:05 +00:00
Chris Lattner
d8d7335f79 convert to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:28:09 +00:00
Chris Lattner
11ade72cda rename this test to sse2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:24:09 +00:00
Chris Lattner
8e1fad4bb7 merge a bunch more sse3 tests into sse3.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:21:44 +00:00
Chris Lattner
075ee999d3 convert test to filecheck format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:05:03 +00:00
Chris Lattner
bd0463098b rename test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:01:44 +00:00
Chris Lattner
37c59b48c7 this is a test for sse3, simplify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:01:19 +00:00
Jakob Stoklund Olesen
d62c9a697b Don't setCalleeSavedInfoValid() until spills are interted.
In a naked function, the flag is never set and getPristineRegs() returns an
empty list. That means naked functions are able to clobber callee saved
registers, but that is the whole point of naked functions.

This fixes PR4716.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 13:10:46 +00:00
Jakob Stoklund Olesen
7d927212de Add XFAIL testcase for setcc undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 12:10:22 +00:00
Jakob Stoklund Olesen
ea60d3d9f2 Add XFAIL test case for a scavenger assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 12:09:56 +00:00
Jakob Stoklund Olesen
7a1e872564 Update LocalRewriter::DistanceMap when inserting stack loads.
In the included test case, a stack load was not included in DistanceMap. That
caused TransferDeadness to ignore the instruction, leading to a scavenger
assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 11:03:03 +00:00
Evan Cheng
39f4d470b6 Fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 08:23:11 +00:00
Evan Cheng
bc9b754091 Turn on if-conversion for thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 07:59:10 +00:00
Chris Lattner
760e24cd05 use XCore-specific section with xcore specific cp/dp flags to restore
support for globals going into the appropriate sections with the flags.

This hopefully finishes unbreaking the previous behavior that I broke before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 06:09:35 +00:00
Dan Gohman
d6708eade0 On x86-64, for a varargs function, don't store the xmm registers to
the register save area if %al is 0. This avoids touching xmm
regsiters when they aren't actually used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79061 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 01:38:56 +00:00
Evan Cheng
98a0104014 Leaf functions which do not save CSRs can be frameless even with -disable-fp-elim.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 20:48:13 +00:00
Daniel Dunbar
e44313e0ca llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
- We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two 
   'rep;movsl' instructions (which I missed before).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 19:59:24 +00:00
Daniel Dunbar
b2d0b6b8c7 llvm-mc: When handling a .set, make sure to print subsequent references to the
symbol as the symbol name itself, not the expression it was defined to. These
have different semantics due to the quirky .set behavior (which absolutizes an
expression that would otherwise be treated as a relocation).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 19:10:46 +00:00
Daniel Dunbar
12de0df59f llvm-mc: zerofill shouldn't print quotes around the section,segment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:51:45 +00:00
Evan Cheng
31b99dd760 Also shrink immediate branches; also more assembler workarounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:31:44 +00:00
Daniel Dunbar
1ab7594946 llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:19:52 +00:00
Anton Korobeynikov
2247276c6f Properly handle indirect win64 args when they're passed in memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 18:19:10 +00:00
Daniel Dunbar
717f1dcfac Take another shot at disabling this when no ppc support is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 16:40:12 +00:00
Daniel Dunbar
c22e0b2443 Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:48:55 +00:00
Evan Cheng
a1efbbdbf3 Shrink ADR and LDR from constantpool late during constantpool island pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 00:32:16 +00:00
Daniel Dunbar
bb23973934 Mark this test as requiring the powerpc target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:47:58 +00:00
Bruno Cardoso Lopes
fdf229eda9 Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
must be emitted for PowerPC-Linux '.bss' section


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 23:30:21 +00:00
Daniel Dunbar
b42dad4761 Revert 78892 and 78895, these break generating working executables on
x86_64-apple-darwin10.

--- Reverse-merging r78895 into '.':
U    test/CodeGen/PowerPC/2008-12-12-EH.ll
U    lib/Target/DarwinTargetAsmInfo.cpp
--- Reverse-merging r78892 into '.':
U    include/llvm/Target/DarwinTargetAsmInfo.h
U    lib/Target/X86/X86TargetAsmInfo.cpp
U    lib/Target/X86/X86TargetAsmInfo.h
U    lib/Target/ARM/ARMTargetAsmInfo.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/ARMTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.cpp
U    lib/Target/PowerPC/PPCTargetAsmInfo.h
U    lib/Target/PowerPC/PPCTargetMachine.cpp
G    lib/Target/DarwinTargetAsmInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:03:38 +00:00
Chris Lattner
b71b909bc7 reintroduce support for Mips "small" section handling. This is
implemented somewhat differently than before, but it should have
the same functionality and the previous testcase passes again.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 06:28:06 +00:00
Evan Cheng
48bd7e3bbc tPOP_RET now has predicate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 06:05:07 +00:00
Chris Lattner
bf04f72592 fix typo, add 10.6 version of test for my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 05:43:33 +00:00
Evan Cheng
86e5f7b6f8 It's ok to spill a tGPR register as long as it's still allocated a low register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 05:40:51 +00:00
Mon P Wang
7c4efa6808 When InstCombine simplifies a load -> extract element to gep -> load, place
the new load by the old load instead of by the extract element because
a store could have occurred between the load and extract element.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 05:12:13 +00:00
Bruno Cardoso Lopes
b808588a3a Change MCSectionELF to represent a section semantically instead of
syntactically as a string, very similiar to what Chris did with MachO.
The parsing support and validation is not introduced yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 05:07:35 +00:00
Dan Gohman
cf20ac4fd1 Various AsmWriter output cleanups. Use WriteAsOperand instead of
PrintUnmangledNameSafely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 01:36:44 +00:00
Dan Gohman
9bf0b9bd44 Now that numbered types have their number printed, it's no longer
interesting to print the number in a comment. Numbered instructions
don't need their number in a comment either.

Also, tidy up newline printing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78865 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 23:54:22 +00:00
Dan Gohman
3845e50ede Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."
and unnamed numbered global variables as "@0 = global ...". Extend the
AsmParser to recognize these forms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 23:32:33 +00:00
Dan Gohman
46d505647d Use WriteAsOperand to print BasicBlock names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 20:56:56 +00:00
Bob Wilson
114a266c94 Generate Neon VTBL and VTBX instructions from the corresponding intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 20:51:55 +00:00
Dale Johannesen
871fc2eaa0 Test for 78821, sort of. While that bug is nondeterministic,
this test failed consistently on a Darwin build.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 17:43:47 +00:00
Dan Gohman
6b018979da Fix whitespace expectations to match the new AsmWriter behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 17:39:04 +00:00
Dan Gohman
683e922d29 Make LLVM Assembly dramatically easier to read by aligning the comments,
using formatted_raw_ostream's PadToColumn.

Before:

bb1:            ; preds = %bb
  %2 = sext i32 %i.01 to i64            ; <i64> [#uses=1]
  %3 = getelementptr double* %p, i64 %2         ; <double*> [#uses=1]
  %4 = load double* %3, align 8         ; <double> [#uses=1]
  %5 = fmul double %4, 1.100000e+00             ; <double> [#uses=1]
  %6 = sext i32 %i.01 to i64            ; <i64> [#uses=1]
  %7 = getelementptr double* %p, i64 %6         ; <double*> [#uses=1]

After:

bb1:                                        ; preds = %bb
  %2 = sext i32 %i.01 to i64                ; <i64> [#uses=1]
  %3 = getelementptr double* %p, i64 %2     ; <double*> [#uses=1]
  %4 = load double* %3, align 8             ; <double> [#uses=1]
  %5 = fmul double %4, 1.100000e+00         ; <double> [#uses=1]
  %6 = sext i32 %i.01 to i64                ; <i64> [#uses=1]
  %7 = getelementptr double* %p, i64 %6     ; <double*> [#uses=1]

Several tests required whitespace adjustments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 17:23:50 +00:00
Dan Gohman
9ca9daad21 Transform -X/C to X/-C, implementing a README.txt entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78812 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 16:37:02 +00:00
Dan Gohman
fa94b948d9 Optimize (x/C)*C to x if the division is exact.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 16:33:09 +00:00
Chris Lattner
54d26fa799 one last (?) bad x86 triple test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 06:49:44 +00:00
Chris Lattner
db777bbb97 fix some pastos in triple lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 06:49:12 +00:00
Chris Lattner
9249a9241d another bogus triple
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 06:36:52 +00:00
Chris Lattner
118987f080 fix another broken target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78796 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 06:29:18 +00:00
Chris Lattner
ff740d11f0 fix an incorrect target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78795 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 06:28:51 +00:00
Chris Lattner
e14463832c add nounwind
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 05:44:03 +00:00
Evan Cheng
ea253b99e9 Remove an Darwin assembler workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 01:56:42 +00:00
Evan Cheng
05c269c645 Shrink ADDS, ADC, RSB, and SUBS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 01:49:45 +00:00
Bill Wendling
c98c68777f Testcase for r78770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 01:47:51 +00:00
Dale Johannesen
428473bf21 Test for llvm-gcc patch 78762.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 01:14:30 +00:00
Dan Gohman
45563ba9e3 llvm-gcc now emits inbounds for this getelementptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 00:35:55 +00:00
Daniel Dunbar
1095f2ae26 llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')
We now match all of 403.gcc (as emitted by clang). :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 23:23:44 +00:00
Evan Cheng
b89030ab65 Shrinkify Thumb2 r = add sp, imm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 23:00:31 +00:00
Evan Cheng
4b322e58b7 Shrinkify Thumb2 load / store multiple instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 21:11:32 +00:00
Dan Gohman
1bdf5dc835 Optimize exact sdiv by a constant power of 2 to ashr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 20:47:47 +00:00
Dan Gohman
f536368be8 Use wchar.h to get wchar_t, not ctype.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 19:59:21 +00:00
Devang Patel
ab67e705f5 Link NamedMDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 18:01:24 +00:00
Daniel Dunbar
b27a41b440 llvm-mc: Fix a crash on invalid due to a typo in relocatable expression
evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:47:52 +00:00
Chris Lattner
d3fe75e2bf now that these are in file-check format, we can merge them together
into one bigger test (which runs faster)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:54:17 +00:00
Dan Gohman
004072508b Don't assume that external global variables are aligned at their preferred
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:50:03 +00:00
Evan Cheng
195c71b472 Fix the previous accidental commit. Now shrinking common Thumb2 load / store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 09:37:40 +00:00