SelectionDAG: Make sure stores are always added to the LegalizedNodes list
authorTom Stellard <thomas.stellard@amd.com>
Wed, 21 Aug 2013 22:42:58 +0000 (22:42 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 21 Aug 2013 22:42:58 +0000 (22:42 +0000)
commit1b2c2d8414efc1348fe2c97627cc03b304a8f53e
tree9796c365652c51d45e5b5d867e46147093c1034a
parenta90d44061bacf30bdd6f3f63819881116735fd24
SelectionDAG: Make sure stores are always added to the LegalizedNodes list

When truncated vector stores were being custom lowered in
VectorLegalizer::LegalizeOp(), the old (illegal) and new (legal) node pair
was not being added to LegalizedNodes list.  Instead of the legalized
result being passed to VectorLegalizer::TranslateLegalizeResult(),
the result was being passed back into VectorLegalizer::LegalizeOp(),
which ended up adding a (new, new) pair to the list instead.

This was causing an assertion failure when a custom lowered truncated
vector store was the last instruction a basic block and the VectorLegalizer
was unable to find it in the LegalizedNodes list when updating the
DAG root.

llvm-svn: 188953
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/test/CodeGen/R600/trunc-vector-store-assertion-failure.ll [new file with mode: 0644]