mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-09 22:24:37 +00:00
WidenVecRes_BUILD_VECTOR must use the first operand's type
Because integer BUILD_VECTOR operands may have a larger type than the result's vector element type, and all operands must have the same type, when widening a BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but rather must use the type of the existing operands. Another bug found by llvm-stress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1872,7 +1872,10 @@ SDValue DAGTypeLegalizer::WidenVecRes_BUILD_VECTOR(SDNode *N) {
|
||||
SDLoc dl(N);
|
||||
// Build a vector with undefined for the new nodes.
|
||||
EVT VT = N->getValueType(0);
|
||||
EVT EltVT = VT.getVectorElementType();
|
||||
|
||||
// Integer BUILD_VECTOR operands may be larger than the node's vector element
|
||||
// type. The UNDEFs need to have the same type as the existing operands.
|
||||
EVT EltVT = N->getOperand(0).getValueType();
|
||||
unsigned NumElts = VT.getVectorNumElements();
|
||||
|
||||
EVT WidenVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
|
||||
|
Reference in New Issue
Block a user