Skip to content

Commit 03954a1

Browse files
committed
[AMDGPU] Fix DS_WRITE_B32 patterns
It uses VGPR_32.RegTypes which includes 16 bit types. As a result DS_WRITE_B32 may be generated for "store i16" which is a bug. The only reason we do not hit it now is relative patterns complexity and sorting. Should DS_WRITE_B16 pattern complexity become higher and the bug appears. Differential Revision: https://reviews.llvm.org/D74868
1 parent ddd2257 commit 03954a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/DSInstructions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ defm : DSWritePat_mc <DS_WRITE_B16, i32, "truncstorei16_local">;
725725
defm : DSWritePat_mc <DS_WRITE_B8, i16, "truncstorei8_local">;
726726
defm : DSWritePat_mc <DS_WRITE_B16, i16, "store_local">;
727727

728-
foreach vt = VGPR_32.RegTypes in {
728+
foreach vt = Reg32Types.types in {
729729
defm : DSWritePat_mc <DS_WRITE_B32, vt, "store_local">;
730730
}
731731

0 commit comments

Comments
 (0)