Merge pull request #1289 from Igalia/igalia/dmat-scalar-division
Use the correct type for the constant for matrix/scalar division
This commit is contained in:
commit
cb32c54466
3 changed files with 20 additions and 1 deletions
|
|
@ -848,6 +848,23 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
|
|||
return c->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::makeFpConstant(Id type, double d, bool specConstant)
|
||||
{
|
||||
assert(isFloatType(type));
|
||||
|
||||
switch (getScalarTypeWidth(type)) {
|
||||
case 16:
|
||||
return makeFloat16Constant(d, specConstant);
|
||||
case 32:
|
||||
return makeFloatConstant(d, specConstant);
|
||||
case 64:
|
||||
return makeDoubleConstant(d, specConstant);
|
||||
}
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
Id Builder::findCompositeConstant(Op typeClass, const std::vector<Id>& comps)
|
||||
{
|
||||
Instruction* constant = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue