Skip to content

Commit a1e8a6a

Browse files
committed
fix crash with fptrunc/fpext
1 parent 101f19a commit a1e8a6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ir/instr.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,12 +1561,13 @@ StateValue FpConversionOp::toSMT(State &s) const {
15611561

15621562
if (getType().isVectorType()) {
15631563
vector<StateValue> vals;
1564-
auto ty = getType().getAsAggregateType();
1564+
auto ty = val->getType().getAsAggregateType();
1565+
auto retty = getType().getAsAggregateType();
15651566

15661567
for (unsigned i = 0, e = ty->numElementsConst(); i != e; ++i) {
1567-
vals.emplace_back(scalar(ty->extract(v, i), ty->getChild(i)));
1568+
vals.emplace_back(scalar(ty->extract(v, i), retty->getChild(i)));
15681569
}
1569-
return ty->aggregateVals(vals);
1570+
return retty->aggregateVals(vals);
15701571
}
15711572
return scalar(v, getType());
15721573
}

0 commit comments

Comments
 (0)