Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- A case of tiling with a complex dependency. | ||
-- == | ||
-- compiled random input { [100]i32 } auto output | ||
-- structure distributed { SegMap/DoLoop/SegMap 2 } | ||
|
||
let main (xs: []i32) = | ||
map (\x -> | ||
let y = x + 2 -- Used in postlude. | ||
let z = loop z=0 while z < 1337 do z * 2 + y -- Uses 'y', but | ||
-- cannot itself | ||
-- be inlined in | ||
-- the postlude. | ||
let loopres = #[sequential] i32.sum (map (+z) xs) -- Uses z. | ||
in loopres + i32.clz y -- 'y' must be made available here. | ||
) | ||
xs |