forked from OSchip/llvm-project
parent
369ea3cb77
commit
8b749b2364
|
@ -150,17 +150,17 @@ VectorTargetTransformImpl::getInstrCost(unsigned Opcode, Type *Ty1,
|
||||||
// Check if any of the operands are vector operands.
|
// Check if any of the operands are vector operands.
|
||||||
int ISD = InstructionOpcodeToISD(Opcode);
|
int ISD = InstructionOpcodeToISD(Opcode);
|
||||||
|
|
||||||
// Selects on vectors are actually vector selects.
|
|
||||||
if (ISD == ISD::SELECT) {
|
|
||||||
assert(Ty2 && "Ty2 must hold the select type");
|
|
||||||
if (Ty2->isVectorTy())
|
|
||||||
ISD = ISD::VSELECT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we don't have any information about this instruction assume it costs 1.
|
// If we don't have any information about this instruction assume it costs 1.
|
||||||
if (ISD == 0)
|
if (ISD == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
// Selects on vectors are actually vector selects.
|
||||||
|
if (ISD == ISD::SELECT) {
|
||||||
|
assert(Ty2 && "Ty2 must hold the condition type");
|
||||||
|
if (Ty2->isVectorTy())
|
||||||
|
ISD = ISD::VSELECT;
|
||||||
|
}
|
||||||
|
|
||||||
assert(Ty1 && "We need to have at least one type");
|
assert(Ty1 && "We need to have at least one type");
|
||||||
|
|
||||||
// From this stage we look at the legalized type.
|
// From this stage we look at the legalized type.
|
||||||
|
|
Loading…
Reference in New Issue