The lane number is constant over its lifetime, but is computed with a
variable i which is not a compile time constant. It therefore can't be
used as a template parameter, and should be marked as const and not
constexpr.
Change-Id: Ie0b950311495831d5224a8fb397cf42d5cf5f25b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26834
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
constexpr int lane_per_reg = 16 / sizeof(Elem);
for (int i = 0; i < Count; i++) {
- constexpr int reg = i / lane_per_reg;
- constexpr int lane = i % lane_per_reg;
+ const int reg = i / lane_per_reg;
+ const int lane = i % lane_per_reg;
RegId id(VecRegClass, reg);
auto val = tc->readVecReg(id);
- val.laneView<Elem, lane>() = ha[i];
+ val.laneView<Elem>(lane) = ha[i];
tc->setVecReg(id, val);
}
}