SelectionDAG: Handle out-of-bounds index in extract vector element
authorPawel Bylica <chfast@gmail.com>
Wed, 6 May 2015 10:19:14 +0000 (10:19 +0000)
committerPawel Bylica <chfast@gmail.com>
Wed, 6 May 2015 10:19:14 +0000 (10:19 +0000)
commitc0b7f693cedcdf0f02208ab4546414645b3084ea
tree828556e9931599c7b8480a6f41344783feac9206
parent3a1777818d1c7783f3468b6744f6e5ce8bfa3b2b
SelectionDAG: Handle out-of-bounds index in extract vector element

Summary: This patch correctly handles undef case of EXTRACT_VECTOR_ELT node where the element index is constant and not less than vector size.

Test Plan:
CodeGen for X86 test included.
Also one incorrect regression test fixed.

Reviewers: qcolombet, chandlerc, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236584 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/extract-store.ll
test/CodeGen/X86/extractelement-index.ll [new file with mode: 0644]