[PowerPC] Fix the assert of ISD::SIGN_EXTEND_INREG when type is v2i16 and v2i8
authorQingShan Zhang <qshanz@cn.ibm.com>
Wed, 10 Oct 2018 02:33:48 +0000 (02:33 +0000)
committerQingShan Zhang <qshanz@cn.ibm.com>
Wed, 10 Oct 2018 02:33:48 +0000 (02:33 +0000)
commitbc1586352e135fb673360b7d56743ed516c5f7ee
treeba7162c1fc53eb50a9a5623ef1d0049d5e20a8c2
parentd98d505c0dc793233f83f33ac11eaaa9904db5b2
[PowerPC] Fix the assert of ISD::SIGN_EXTEND_INREG when type is v2i16 and v2i8
For ISD::SIGN_EXTEND_INREG operation of v2i16 and v2i8 types will cause assert because they are registered as custom operation.
So that the type legalization phase will enter the custom hook, which do not handle ISD::SIGN_EXTEND_INREG operation and fall throw into unreachable assert.

Patch By: wuzish (Zixuan Wu)
Differential Revision: https://reviews.llvm.org/D52449

llvm-svn: 344109
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/2018-09-19-sextinreg-vector-crash.ll [new file with mode: 0644]