D89217 did not subtract one when accessing SubRegFromChannelTable in one
place.
Details
Details
- Reviewers
critson - Commits
- rG5290f50e44b6: [AMDGPU] Fix off by one in assert
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM.
Thanks, I was going to make the same change, but you beat me to it.
Slight nit. since we use Width - 1 three times, for readability I think we should just declare a new variable for it (TableIdx?).
We cannot easily have a test case for this as it is based on TableGen data.
I would have expected this assertion to be failing already due to the error, but looking at the code generation .size() for this type is a compile time constant, so in practice this becomes assert(Offset < 32), with the index completely disregarded.
Comment Actions
I don’t see a way to add a test case. It fails an assertion on Windows when compiling with msvc.
Changed to use TableIdx.