Commit Graph

11499 Commits

Author SHA1 Message Date
Wesley Peck
90eff7337d Fixed error and re-enabled MBlaze MC disassembler tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 05:48:21 +00:00
Rafael Espindola
e13a0ff8ac Parse and record the gnu_unique_object type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 04:51:02 +00:00
Dale Johannesen
4f8b791d0f This test stops after disassembling 1 instructions on
darwin and, judging from the buildbots, Linux.
Removing it for now, but this is not the right fix,
Wesley please look at it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 03:55:04 +00:00
Rafael Espindola
c50a0fd7cb Parse and remember discriminators in .loc line. I try to output them with
another patch.
This lets us parse a bit more of the gcc 4.5 output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 03:18:27 +00:00
Wesley Peck
7247c079f7 Add test cases that should have been committed with 118969.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 02:51:00 +00:00
Wesley Peck
ec57d53342 1. Adding test cases for MBlaze MC disassembler.
2. Fixing several errors in disassembler uncovered by test cases.
3. Fixing invalid encoding of PCMPEQ and PCMPNE uncovered by test cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118969 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 02:37:59 +00:00
Evan Cheng
63f3544a7f Add conditional move of large immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118968 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 02:25:14 +00:00
Rafael Espindola
64185cc609 Fix the encoding of negative line deltas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 01:06:27 +00:00
Daniel Dunbar
46a2716910 lli: Switch to using ParseIRFile, for consistency with other LLVM tools.
- Also, switch tests to not using llvm-as. They run 20% faster now, not that it matters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 00:28:01 +00:00
Evan Cheng
e5e0ef180e Fix an obvious typo which inverted an immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 00:27:47 +00:00
Eric Christopher
6eb39a09b4 This should be still failing, but is. Disable it with the
forget-me-stick for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 00:25:06 +00:00
Wesley Peck
24d06f2be5 1. Adding missing immediate mode asm parser test cases.
2. Fixing improper immediate mode reverse subtract.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-13 00:03:46 +00:00
Wesley Peck
8bfdd87714 Fixing improperly encoded reverse subtract instructions in MBlaze backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 23:41:10 +00:00
Wesley Peck
41400da31e 1. Finishing MBlaze MC asm parser test cases
2. Parsing .word directive in MBlaze asm parser
3. Fixing hack where memory instructions reversed order of last two parameters
4. Fixing many improperly encoded instructions
5. Support parsing special instructions (MFS,MTS,etc.)
6. Removing unused functions from inst printer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 23:30:17 +00:00
Evan Cheng
875a6ac09a Add conditional mvn instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 22:42:47 +00:00
Owen Anderson
5de6d841a5 First stab at providing correct Thumb2 encodings, start with adc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118924 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 21:12:40 +00:00
Evan Cheng
529916ca4a Add some missing isel predicates on def : pat patterns to avoid generating VFP vmla / vmls (they cause stalls). Disabling them in isel is properly not a right solution, I'll look into a proper solution next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118922 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 20:32:20 +00:00
Chris Lattner
269f10b316 accept lret as an alias for lretl, fixing the reopened part of PR8592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 18:54:56 +00:00
Andrew Trick
11f20edcf9 Emacs auto-fill bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 18:17:46 +00:00
Andrew Trick
4252ffdef6 Test case for PR8287: SD scheduling time. Fixed in r118904.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 17:57:22 +00:00
Chris Lattner
6b5e3978e3 implement PR8592: empirically "lretq" is a "lret" with a rex.w prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118903 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 17:41:20 +00:00
Rafael Espindola
d4a352609f gnu as support both % and @ before types, do the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118893 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 15:47:08 +00:00
Kalle Raiskila
7ea1ab5f41 Fix memory access lowering on SPU, adding
support for the case where alignment<value size.

These cases were silently miscompiled before this patch.
Now they are overly verbose -especially storing is- and
any front-end should still avoid misaligned memory 
accesses as much as possible. The bit juggling algorithm
added here probably has some room for improvement still.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 10:14:03 +00:00
Dan Gohman
720a2ed6d9 Enhance DSE to handle the case where a free call makes more than
one store dead. This is especially noticeable in
SingleSource/Benchmarks/Shootout/objinst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 02:19:17 +00:00
Dan Gohman
02df7e90cf Filecheckize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 02:02:39 +00:00
Bruno Cardoso Lopes
7d5652dcd5 Enable mips32 mul instruction. Patch by Akira Hatanaka <ahatanaka@mips.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12 00:38:32 +00:00
Owen Anderson
8f14391314 Fill out support for Thumb2 encodings of NEON instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 23:12:55 +00:00
Wesley Peck
ef5b390263 Fix tblgen instruction errors exposed by MC asm parser tests
Fix minimum 16-bit signed value error exposed by MC asm parser tests
Add initial MC asm parser tests for the MBlaze backend


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 21:40:53 +00:00
Owen Anderson
57dac88f77 Add correct Thumb2 encodings for NEON vst[1,2,3,4] and vld[1,2,3,4].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118843 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 21:36:43 +00:00
Dan Gohman
4d70a29490 Factor out Instruction::isSafeToSpeculativelyExecute's code for
testing for dereferenceable pointers into a helper function,
isDereferenceablePointer.  Teach it how to reason about GEPs
with simple non-zero indices.

Also eliminate ArgumentPromtion's IsAlwaysValidPointer,
which didn't check for weak externals or out of range gep
indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118840 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 21:23:25 +00:00
Owen Anderson
410cb57524 Flesh out tests for Thumb2 encodings of NEON instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 21:15:47 +00:00
Dan Gohman
32d1fe52e2 Delete unneeded ssp attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 21:08:46 +00:00
Owen Anderson
c7139a6f0d Add support for Thumb2 encodings of NEON data processing instructions, using the new PostEncoderMethod infrastructure.
More tests to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 19:07:48 +00:00
Rafael Espindola
e1a2587ee2 Mark labels declared in tls sections as STT_TLS. This matches the behavior of
gas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 19:04:55 +00:00
Rafael Espindola
2ff9e83a82 Initial comdat implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 18:13:52 +00:00
Dan Gohman
56653f0df8 TBAA-enable ArgumentPromotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118804 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 18:09:32 +00:00
Rafael Espindola
9302bd664d Make AliasedSymbol able to handle MCTargetExpr. They can get here if
a weakref is used with a VariantKind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 17:24:43 +00:00
Rafael Espindola
03f1b74aed Fix the symbol index of weak references. Also make RecordRelocation a bit
easier to read by having const references to the symbol, aliased symbol and
renamed symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 16:48:11 +00:00
Dan Gohman
efb8a9d0c2 Remove the memmove->memcpy optimization from CodeGen. MemCpyOpt does this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 16:24:49 +00:00
Dan Gohman
5aae3dcb53 Make Sink tbaa-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 16:21:47 +00:00
NAKAMURA Takumi
e7ae70b137 CMake: Add the new option "LLVM_LIT_ARGS".
Defaults:
if (MSVC OR XCODE): "-sv --no-progress-bar"
else: "-sv"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118776 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 04:09:35 +00:00
Dan Gohman
f00833c401 Add a testcase which demonstrates alias analysis pass precedence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11 01:03:30 +00:00
Dan Gohman
733c54da1e Fully invalidate cached results when a prior query's size or
type is insufficient for, or incompatible with, the current query.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118721 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 21:45:11 +00:00
Dan Gohman
075fb5d68f Enhance GVN to do more precise alias queries for non-local memory
references. For example, this allows gvn to eliminate the load in
this example:

  void foo(int n, int* p, int *q) {
    p[0] = 0;
    p[1] = 1;
    if (n) {
      *q = p[0];
    }
  }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 20:37:15 +00:00
Duncan Sands
a74a58c83b Teach InstructionSimplify how to look through PHI nodes. Since PHI
nodes can be used in loops, this could result in infinite looping
if there is no recursion limit, so add such a limit.  It is also
used for the SelectInst case because in theory there could be an
infinite loop there too if the basic block is unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 18:23:01 +00:00
Bruno Cardoso Lopes
0cf2b2b9f0 Add a test to the previous added clo instruction. Patch by Akira again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118668 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 02:22:44 +00:00
Dale Johannesen
201ab3acff When checking that the necessary bits are zero in
order to reduce ((x<<30)>>24) to x<<6, check the
correct bits.  PR 8547.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 01:30:56 +00:00
Dan Gohman
42c31a7073 Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
chaining and simplify FunctionAttrs' GetModRefBehavior logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 01:02:18 +00:00
Dale Johannesen
18f601820c Jim's recent fixes 118600, 118587, 118513 have made these work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 23:43:34 +00:00
Bob Wilson
54f9256380 Do not use MEMBARRIER_MCR for any Thumb code.
It is only supported for ARM code.  Normally Thumb2 code would use DMB instead,
but depending on how the compiler is invoked (e.g., -mattr=-db) that might be
disabled.  This prevents a "cannot select MEMBARRIER_MCR" error in that
situation.  Radar 8644195

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 22:50:44 +00:00
Dan Gohman
4cf0dcfb44 Teach FunctionAttrs about the VAArg instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 20:17:38 +00:00
Duncan Sands
68c39552a5 Testcase for PR8211 (llc crash at -O0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 16:22:27 +00:00
Dan Gohman
6a559cd695 Fix DAGCombiner to avoid folding a sext-in-reg or similar through a shl
in order to fold it into a load.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 01:54:35 +00:00
Dan Gohman
be7c5116a7 Delete an extraneous svn:executable property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 01:51:06 +00:00
Dale Johannesen
71365d3774 Fix an inline asm pasto from 117667; was preventing
{i64, i64} from matching i128.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 01:15:07 +00:00
Owen Anderson
c24cb3551e Add support for ARM's specialized vector-compare-against-zero instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 23:21:22 +00:00
Duncan Sands
1d32db4406 Add an additional test for icmp of select folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 20:56:28 +00:00
Dan Gohman
e5dd6624ea Add a testcase for a call which BasicAA says only accesses memory through
its arguments and which TBAA says doesn't write to memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 20:20:11 +00:00
Dale Johannesen
7179d1e5c0 Revert 118422 in search of bot verdancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 19:17:22 +00:00
Jason W Kim
69ad7138b7 Support -mcpu=cortex-a8 in ARM attributes - Has Fixme. 1 Test modified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 17:58:07 +00:00
Dan Gohman
ea8900f5df Make FunctionAttrs TBAA-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 17:12:04 +00:00
Dan Gohman
a25e5dbcc2 Extend the AliasAnalysis::pointsToConstantMemory interface to allow it
to optionally look for constant or local (alloca) memory.

Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select
and Phi nodes, and to support looking for local memory.

Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that
AliasAnalysis knows all the tricks that it knew.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 16:45:26 +00:00
Dan Gohman
3c97f7af9e Make FunctionAttrs use AliasAnalysis::getModRefBehavior, now that it
knows about intrinsic functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 16:10:15 +00:00
Rafael Espindola
4faf7c78fe Set default flags for .rodata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 02:47:59 +00:00
Duncan Sands
92826def59 Add simplification of floating point comparisons with the result
of a select instruction, the same as already exists for integer
comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 16:46:25 +00:00
Duncan Sands
1ac7c9979a Fix a README item: when doing a comparison with the result
of a select instruction, see if doing the compare with the
true and false values of the select gives the same result.
If so, that can be used as the value of the comparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 16:12:23 +00:00
Dale Johannesen
7944988c25 Testcase for llvm-gcc 118368. 8629268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 04:58:48 +00:00
Rafael Espindola
187d8339db Relax dwarf line fragments. This fixes a crash in the included testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 02:07:12 +00:00
Chris Lattner
689cf3cb62 implement aliases for div/idiv that have an explicit A register operand,
implementing rdar://8431864


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 22:41:18 +00:00
Chris Lattner
04a75abe23 add aliases for movs between seg registers and mem. There are multiple
different forms of this instruction (movw/movl/movq) which we reported
as being ambiguous.  Since they all do the same thing, gas just picks the
one with the shortest encoding.  Follow its lead here.

This implements rdar://8208615


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118362 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 22:35:34 +00:00
Chris Lattner
db28788e4a go to great lengths to work around a GAS bug my previous patch
exposed:

GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)"
even though st(0) is implicit in all other fp stack instructions.

Fortunately, there is an alias for fcomip named "fcompi" and gas does
accept the default argument for the alias (boggle!).

As such, switch the canonical form of this instruction to "pi" instead
of "ip".  This makes the code generator and disassembler generate pi,
avoiding the gas bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 21:37:06 +00:00
Chris Lattner
8c24b0c699 rework the rotate-by-1 instructions to be defined like the
shift-by-1 instructions, where the asmstring doesn't contain
the implicit 1.  It turns out that a bunch of these rotate
instructions were completely broken because they used 1 
instead of $1.

This fixes assembly mismatches on "rclb	$1, %bl" and friends,
where we used to generate the 3 byte form, we now generate the
proper 2-byte form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 21:23:40 +00:00
Chris Lattner
235705b9ca change the fp comparison instructions to not have %st0 explicitly
listed in its asm string, for consistency with the other similar
instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 20:55:09 +00:00
Chris Lattner
fb7000fcbd correct suffix matching to search for s/l/t suffixes on
floating point stack instructions instead of looking for b/w/l/q.

This fixes issues where we'd accidentally match fistp to fistpl,
when it is in fact an ambiguous instruction.

This changes the behavior of llvm-mc to reject fstp, which was the
correct fix for rdar://8456389:
t.s:1:1: error: ambiguous instructions require an explicit suffix (could be 'fstps', 'fstpl', or 'fstpt')
fstp	(%rax)

it also causes us to correctly reject fistp and fist, which addresses
PR8528:

t.s:2:1: error: ambiguous instructions require an explicit suffix (could be 'fistps', or 'fistpl')
fistp (%rax)
^
t.s:3:1: error: ambiguous instructions require an explicit suffix (could be 'fists', or 'fistl')
fist (%rax)
^

Thanks to Ismail Donmez for tracking down the issue here!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 18:28:02 +00:00
Owen Anderson
080c092297 Add codegen and encoding support for the immediate form of vbic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 19:27:46 +00:00
Duncan Sands
1e92ec6886 When passing a huge parameter using the byval mechanism, a long
sequence of loads and stores was being generated to perform the
copy on the x86 targets if the parameter was less than 4 byte
aligned, causing llc to use up vast amounts of memory and time.
Use a "rep movs" form instead.  PR7170.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 21:16:46 +00:00
Evan Cheng
416941d50f Fix @llvm.prefetch isel. Selecting between pld / pldw using the first immediate rw. There is currently no intrinsic that matches to pli.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 05:19:35 +00:00
Bill Wendling
2f46f1f59c Add encoding for VSTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 00:59:42 +00:00
Owen Anderson
60f4870c22 Covert VORRIMM to be produced via early target-specific DAG combining, rather than legalization.
This is both the conceptually correct place for it, as well as allowing it to be more aggressive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 23:15:26 +00:00
Owen Anderson
d966817f3c Add support for code generation of the one register with immediate form of vorr.
We could be more aggressive about making this work for a larger range of constants,
but this seems like a good start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 22:44:51 +00:00
Evan Cheng
949c910fb3 Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 18:21:33 +00:00
Owen Anderson
7a25825033 Unlike a lot of NEON instructions, vext isn't _actually_ parameterized by element size. Instead,
all of the different element sizes are pseudo instructions that map down to vext.8 underneath, with
the immediate shifted left to reflect the increased element size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 18:16:27 +00:00
Dale Johannesen
d5ce456161 This test assumes SSE is present; that is not the default
on non-X86 hosts.  Hopefully fixes ppc-host buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118182 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 18:08:41 +00:00
Bob Wilson
d168cef664 Add codegen patterns for VST1-lane instructions. Radar 8599955.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118176 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 16:24:53 +00:00
Bob Wilson
3468c2ee20 Check for extractelement with a variable operand for the element number.
For NEON we had been assuming this was always an immediate constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 16:24:50 +00:00
Evan Cheng
dfed19fe2c Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 06:34:55 +00:00
Evan Cheng
bc7deb0f75 Add support to match @llvm.prefetch to pld / pldw / pli. rdar://8601536.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118152 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 05:14:24 +00:00
Bill Wendling
92b5a2eb16 The MC code couldn't handle ARM LDR instructions with negative offsets:
vldr.64 d1, [r0, #-32]

The problem was with how the addressing mode 5 encodes the offsets. This change
makes sure that the way offsets are handled in addressing mode 5 is consistent
throughout the MC code. It involves re-refactoring the "getAddrModeImmOpValue"
method into an "Imm12" and "addressing mode 5" version. But not to worry! The
majority of the duplicated code has been unified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 01:49:29 +00:00
Dan Gohman
394d6298bc Fix DAGCombiner to avoid going into an infinite loop when it
encounters (and:i64 (shl:i64 (load:i64), 1), 0xffffffff).
This fixes rdar://8606584.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 01:47:46 +00:00
Evan Cheng
8239daf7c8 Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
   "optimize for latency". Call instructions don't have the right latency and
   this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
   not # of micro-ops since multi-latency instructions is completely executed
   even when the predicate is false. Also, some instruction will be "slower"
   when they are predicated due to the register def becoming implicit input.
   rdar://8598427


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 00:45:17 +00:00
Chris Lattner
f4b284f991 chase owen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 23:55:24 +00:00
Chris Lattner
ca99597ed5 tweak this to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 23:50:17 +00:00
Chris Lattner
d5b02302f3 temporarily xfail this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 23:44:50 +00:00
John Thompson
45c21ff044 Inline asm mult-alt constraint tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 23:01:44 +00:00
Bill Wendling
5df0e0a61d Rename getAddrModeImm12OpValue to getAddrModeImmOpValue and expand it to work
with immediates up to 16-bits in size. The same logic is applied to other LDR
encodings, e.g. VLDR, but which use a different immediate bit width (8-bits in
VLDR's case). Removing the "12" allows it to be more generic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118094 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 22:31:46 +00:00
Owen Anderson
b20594fce6 Provide correct encodings for the remaining vst variants that we currently generate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 22:18:18 +00:00
Owen Anderson
a1a45fd254 Add correct encodings for basic variants for vst3 and vst4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118082 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 21:47:03 +00:00
Owen Anderson
d2f3794e4d Add correct encodings for the basic variants for vst2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 21:16:58 +00:00
Owen Anderson
cfebe3a8b1 Add correct encodings for the basic form of vst1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118067 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 21:06:06 +00:00
Owen Anderson
f0ea0f2b15 Add correct encodings for the rest of the vld instructions that we generate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 20:40:59 +00:00