llvm-6502/test/CodeGen/Thumb
Peter Collingbourne 27565d6185 Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.
We were previously codegen'ing these as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach
the register allocator to allocate the registers in ascending order. This
never got implemented, and up to now we've been stuck with very poor codegen.

A much simpler approach for achiveing better codegen is to create LDM/STM
instructions with identical sets of virtual registers, let the register
allocator pick arbitrary registers and order register lists when printing an
MCInst. This approach also avoids the need to repeatedly calculate offsets
which ultimately ought to be eliminated pre-RA in order to decrease register
pressure.

This is implemented by lowering the memcpy intrinsic to a series of SD-only
MCOPY pseudo-instructions which performs a memory copy using a given number
of registers. During SD->MI lowering, we lower MCOPY to LDM/STM. This is a
little unusual, but it avoids the need to encode register lists in the SD,
and we can take advantage of SD use lists to decide whether to use the _UPD
variant of the instructions.

Fixes PR9199.

Differential Revision: http://reviews.llvm.org/D9508

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28 20:02:45 +00:00
..
2007-01-31-RegInfoAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2007-02-02-JoinIntervalsCrash.ll
2007-05-05-InvalidPushPop.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-06-18-ThumbCommuteMul.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
2009-07-20-TwoAddrBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-07-27-PEIAssert.ll
2009-08-12-ConstIslandAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-12-RegInfoAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2009-08-20-ISelBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-12-17-pre-regalloc-taildup.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2010-06-18-SibCallCrash.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
2010-07-01-FuncAlign.ll
2010-07-15-debugOrdering.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
2011-05-11-DAGLegalizer.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2011-06-16-NoGPRs.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2011-EpilogueBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2012-04-26-M0ISelBug.ll Improve logic that decides if its profitable to commute when some of the virtual registers involved have uses/defs chains connecting them to physical register. Fix up the tests that this change improves. 2014-11-05 06:43:02 +00:00
2014-06-10-thumb1-ldst-opt-bug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
asmprinter-bug.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
barrier.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
copy_thumb.ll Lower thumbv4t & thumbv5 lo->lo copies through a push-pop sequence 2014-08-20 23:38:50 +00:00
cortex-m0-unaligned-access.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
DbgValueOtherTargets.test ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
dyn-stackalloc.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
fastcc.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fpconv.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
fpow.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
frame_thumb.ll
iabs.ll Re-add support to llvm-objdump for Mach-O universal files and archives with -macho 2014-12-04 23:56:27 +00:00
inlineasm-imm-thumb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
inlineasm-thumb.ll [ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return 2014-11-03 20:37:04 +00:00
ispositive.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
large-stack.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ldm-merge-call.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ldm-merge-struct.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
ldm-stm-base-materialization.ll Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM. 2015-05-28 20:02:45 +00:00
ldr_ext.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ldr_frame.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
long_shift.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
long-setcc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
long.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
mature-mc-support.ll Add triples to try to fix the windows bots. 2014-02-13 16:49:47 +00:00
mul.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
pop.ll ARM / x86_64 varargs: Don't save regparms in prologue without va_start 2014-08-22 21:59:26 +00:00
PR17309.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
push.ll
rev.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
segmented-stacks-dynamic.ll Move the segmented stack switch to a function attribute 2014-04-10 22:58:43 +00:00
segmented-stacks.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
select.ll
sjljehprepare-lower-vector.ll
stack_guard_remat.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
stack-access.ll [ARM] Fix handling of thumb1 out-of-range frame offsets 2015-03-20 17:20:07 +00:00
stack-coloring-without-frame-ptr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
stack-frame.ll Make this test not match its own filename, when being run from a path that includes the string 'add'. 2014-04-15 22:29:32 +00:00
stm-merge.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb-imm.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb-ldm.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
thumb-memcpy-ldm-stm.ll Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM. 2015-05-28 20:02:45 +00:00
trap.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
triple.ll
tst_teq.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
unord.ll
vargs.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00