[ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine
authorAdam Nemet <anemet@apple.com>
Tue, 20 May 2014 21:47:07 +0000 (21:47 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 20 May 2014 21:47:07 +0000 (21:47 +0000)
commitadf1668bec523d96a6ddc9fffcc7ae092e919197
treec3a26324b05524018c4095444cce7c3ea80634a6
parente94103adcde704725ccfcd1481035bbc301f755a
[ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine

Povray and dealII currently assert with "Overran sorted position" in
AssignTopologicalOrder.  The problem is that performPostLD1Combine can
introduce cycles.

Consider:

(insert_vector_elt (INSERT_SUBREG undef,
                                  (load (add %vreg0, Constant<8>), undef),  <= A
                                  TargetConstant<2>),
                   (load %vreg0, undef),                                    <= B
                   Constant<1>)

This is turned into a LD1LANEpost node.  However the address in A is not a
valid user of the post-incremented address of B in LD1LANEpost.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM64/ARM64ISelLowering.cpp
test/CodeGen/ARM64/indexed-vector-ldst-2.ll [new file with mode: 0644]