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)
commit9f1fb9d1ef5ad150cb1bcb0c441c8774b25fd285
tree77c4f2b1ebab6eeea6e63cb37dc800581824ba1a
parente71ed1984188faa93e9409d91c21dc721dfdf162
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

llvm-svn: 236584
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/extract-store.ll
llvm/test/CodeGen/X86/extractelement-index.ll [new file with mode: 0644]