ARM: correct liveness flags during ARMLoadStoreOpt
authorTim Northover <tnorthover@apple.com>
Thu, 10 Oct 2013 09:28:20 +0000 (09:28 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 10 Oct 2013 09:28:20 +0000 (09:28 +0000)
commitacd79ce0ada50c7a437757d188f410d67030fbb9
tree274ea0cd930191f2399f1b707ffcc95c26bf7343
parent15de63cfdedc9a449217c841f8e084387b2159c8
ARM: correct liveness flags during ARMLoadStoreOpt

When we had a sequence like:

    s1 = VLDRS [r0, 1], Q0<imp-def>
    s3 = VLDRS [r0, 2], Q0<imp-use,kill>, Q0<imp-def>
    s0 = VLDRS [r0, 0], Q0<imp-use,kill>, Q0<imp-def>
    s2 = VLDRS [r0, 4], Q0<imp-use,kill>, Q0<imp-def>

we were gathering the {s0, s1} loads below the s3 load. This is fine,
but confused the verifier since now the s3 load had Q0<imp-use> with
no definition above it.

This should mark such uses <undef> as well. The liveness structure at
the beginning and end of the block is unaffected, and the true sN
definitions should prevent any dodgy reorderings being introduced
elsewhere.

rdar://problem/15124449

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
test/CodeGen/ARM/vldm-liveness.ll [new file with mode: 0644]