Skip to content

Commit 742eb80

Browse files
implement fixup()
1 parent 9972860 commit 742eb80

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

ir/type.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,12 @@ bool VectorType::isVectorType() const {
11801180
return true;
11811181
}
11821182

1183+
void VectorType::fixup(const Model &m) {
1184+
if (!defined)
1185+
vscale_value = m.getUInt(vscale());
1186+
AggregateType::fixup(m);
1187+
}
1188+
11831189
expr VectorType::enforceVectorType(
11841190
const function<expr(const Type&)> &enforceElem) const {
11851191
return enforceElem(*children[0]);

ir/type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ class VectorType final : public AggregateType {
354354
unsigned maxSubBitAccess() const override;
355355
smt::expr scalarSize() const override;
356356
bool isVectorType() const override;
357+
void fixup(const smt::Model &m) override;
357358
smt::expr enforceVectorType(
358359
const std::function<smt::expr(const Type&)> &enforceElem) const override;
359360
void print(std::ostream &os) const override;

0 commit comments

Comments
 (0)