diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index e99b53fd560..7cf7e0c5c4d 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -329,8 +329,6 @@ public: const uint32_t& operator[](PhysReg index) const { return regs[index]; } - uint32_t& operator[](PhysReg index) { return regs[index]; } - unsigned count_zero(PhysRegInterval reg_interval) const { unsigned res = 0; @@ -457,8 +455,9 @@ private: void fill_subdword(PhysReg start, unsigned num_bytes, uint32_t val) { - fill(start, DIV_ROUND_UP(num_bytes, 4), 0xF0000000); for (PhysReg i = start; i.reg_b < start.reg_b + num_bytes; i = PhysReg(i + 1)) { + regs[i] = 0xF0000000; + /* emplace or get */ std::array& sub = subdword_regs.emplace(i, std::array{0, 0, 0, 0}).first->second;