-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for --assign-lock-ids pass (#772)
- Loading branch information
Showing
3 changed files
with
164 additions
and
47 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,65 @@ | ||
// RUN: aie-opt --aie-assign-lock-ids %s -split-input-file -verify-diagnostics | ||
|
||
AIE.device(xcve2802) { | ||
// expected-note @below {{because only 16 locks available in this tile}} | ||
%tMemTile = AIE.tile(4,4) | ||
%l0 = AIE.lock(%tMemTile) | ||
%l1 = AIE.lock(%tMemTile) | ||
%l2 = AIE.lock(%tMemTile) | ||
%l3 = AIE.lock(%tMemTile) | ||
%l4 = AIE.lock(%tMemTile) | ||
%l5 = AIE.lock(%tMemTile) | ||
%l6 = AIE.lock(%tMemTile) | ||
%l7 = AIE.lock(%tMemTile) | ||
%l8 = AIE.lock(%tMemTile) | ||
%l9 = AIE.lock(%tMemTile) | ||
%l10 = AIE.lock(%tMemTile) | ||
%l11 = AIE.lock(%tMemTile) | ||
%l12 = AIE.lock(%tMemTile) | ||
%l13 = AIE.lock(%tMemTile) | ||
%l14 = AIE.lock(%tMemTile) | ||
%l15 = AIE.lock(%tMemTile) | ||
// expected-error @below {{not allocated a lock}} | ||
%l16 = AIE.lock(%tMemTile) | ||
%l17 = AIE.lock(%tMemTile) | ||
%l18 = AIE.lock(%tMemTile) | ||
%l19 = AIE.lock(%tMemTile) | ||
} | ||
|
||
// ----- | ||
|
||
AIE.device(xcve2802) { | ||
// expected-note @below {{because only 16 locks available in this tile}} | ||
%tMemTile = AIE.tile(4,4) | ||
%l0 = AIE.lock(%tMemTile) | ||
%l1 = AIE.lock(%tMemTile, 1) | ||
%l2 = AIE.lock(%tMemTile) | ||
%l3 = AIE.lock(%tMemTile) | ||
%l4 = AIE.lock(%tMemTile) | ||
%l5 = AIE.lock(%tMemTile) | ||
%l6 = AIE.lock(%tMemTile) | ||
%l7 = AIE.lock(%tMemTile, 2) | ||
%l8 = AIE.lock(%tMemTile) | ||
%l9 = AIE.lock(%tMemTile) | ||
%l10 = AIE.lock(%tMemTile, 15) | ||
%l11 = AIE.lock(%tMemTile) | ||
%l12 = AIE.lock(%tMemTile) | ||
%l13 = AIE.lock(%tMemTile) | ||
%l14 = AIE.lock(%tMemTile) | ||
// expected-error @below {{not allocated a lock}} | ||
%l15 = AIE.lock(%tMemTile) | ||
%l16 = AIE.lock(%tMemTile) | ||
%l17 = AIE.lock(%tMemTile, 3) | ||
%l18 = AIE.lock(%tMemTile) | ||
%l19 = AIE.lock(%tMemTile) | ||
} | ||
|
||
// ----- | ||
|
||
AIE.device(xcve2802) { | ||
//expected-note @below {{tile has lock ops assigned to same lock}} | ||
%t22 = AIE.tile(2,2) | ||
%l0 = AIE.lock(%t22, 7) | ||
// expected-error @below {{is assigned to the same lock (7) as another op}} | ||
%l1 = AIE.lock(%t22, 7) | ||
} |