[SDAG] Allow implicit trunc in BUILD_VECTOR legalization
BUILD_VECTOR may have operands larger than the result element type, in which case it is specified to truncate. As such, allow implicit truncation.
This commit is contained in:
parent
b8972a70d4
commit
edb45d8ae4
@ -2051,7 +2051,8 @@ SDValue SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {
|
||||
// we don't want a v16i8 to become a v16i32 for example.
|
||||
const ConstantInt *CI = V->getConstantIntValue();
|
||||
CV.push_back(ConstantInt::get(EltVT.getTypeForEVT(*DAG.getContext()),
|
||||
CI->getZExtValue()));
|
||||
CI->getZExtValue(), /*IsSigned=*/false,
|
||||
/*ImplicitTrunc=*/true));
|
||||
}
|
||||
} else {
|
||||
assert(Node->getOperand(i).isUndef());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user