-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU][MC] Don't accept attr > 32 for param_load
The docs say the interpolation attribute should be between 0..32 [1][2], but we currently accept values all the way up to 63. This patch makes the ASMParser error out for values > 32. It does not touch codegen though because we're currently not checking anything at all for codegen (llvm.amdgcn.lds.param.load will happily accept even 128 as an attr, although that won't fit in the encoding). [1] https://llvm.org/docs/AMDGPU/gfx8_attr.html#amdgpu-synid-gfx8-attr [2] https://llvm.org/docs/AMDGPU/gfx11_attr.html#amdgpu-synid-gfx11-attr Differential Revision: https://reviews.llvm.org/D150261
- Loading branch information
Showing
5 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s 2>&1 | FileCheck -check-prefix=GFX11 %s | ||
|
||
lds_param_load v17, attr33.x | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
||
lds_param_load v17, attr33.y | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
||
lds_param_load v17, attr33.z | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
||
lds_param_load v17, attr33.w | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
||
lds_param_load v12, attr33.z wait_va_vdst:4 | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
||
lds_param_load v12, attr33.w wait_va_vdst:2 wait_vm_vsrc:1 | ||
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: out of bounds interpolation attribute number | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters