[PATCH] D89804: [AMDGPU] Fix off by one in assert
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 19:36:17 PDT 2020
critson accepted this revision.
critson added a comment.
This revision is now accepted and ready to land.
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89804/new/
https://reviews.llvm.org/D89804
More information about the llvm-commits
mailing list