diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 9a36019ff37..eae3822e61c 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -395,8 +395,10 @@ std::pair get_reg_simple(ra_ctx& ctx, if (stride == 1) { - if (rc.type() == RegType::vgpr && (size == 4 || size == 8)) { - info.stride = 4; + for (unsigned stride = 8; stride > 1; stride /= 2) { + if (size % stride) + continue; + info.stride = stride; std::pair res = get_reg_simple(ctx, reg_file, info); if (res.second) return res;