Skip to content

Commit c489415

Browse files
committed
Test vectorizing through tile and its index set.
1 parent bed0ae8 commit c489415

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/opt-tests.dx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,19 @@ _ = yield_accum (AddMonoid Int32) \result.
211211
-- CHECK: [[mat1:v#[0-9]+]]:<16xInt32> = vbroadcast
212212
-- CHECK: [[prodj:v#[0-9]+]]:<16xInt32> = %imul [[mat1]] [[mat2j]]
213213
-- CHECK: extend [[refj]] [[prodj]]
214+
215+
"vectorizing through the `tile` combinator and its funny index set"
216+
-- CHECK-LABEL: vectorizing through the `tile` combinator and its funny index set
217+
218+
%passes vect
219+
_ = yield_accum (AddMonoid Int32) \result.
220+
tile((Fin 256), 32) \set.
221+
for_ i:set.
222+
ix = inject(i, to=(Fin 256))
223+
result!ix += xs[ix]
224+
-- CHECK: seq (RawFin 0x8)
225+
-- CHECK: seq (RawFin 0x2)
226+
-- CHECK: [[refix:v#[0-9]+]]:(Ref {{v#[0-9]+}} <16xInt32>) = vrefslice
227+
-- CHECK: [[xsix:v#[0-9]+]]:<16xInt32> =
228+
-- CHECK-NEXT: vslice
229+
-- CHECK: extend [[refix]] [[xsix]]

0 commit comments

Comments
 (0)