diff options
author | Alexey Radul <axch@google.com> | 2023-06-26 13:32:16 -0400 |
---|---|---|
committer | Alexey Radul <axch@google.com> | 2023-07-05 15:16:02 -0400 |
commit | c489415792c1491882df0235f589a36879e306db (patch) | |
tree | dc54ebf2687313cdd19e9e785be6fa5152206fea | |
parent | bed0ae8eaf5060e9c3db90bfc4a93fbdd8987262 (diff) |
Test vectorizing through `tile` and its index set.
-rw-r--r-- | tests/opt-tests.dx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/opt-tests.dx b/tests/opt-tests.dx index 76cecb5a..b5376200 100644 --- a/tests/opt-tests.dx +++ b/tests/opt-tests.dx @@ -211,3 +211,19 @@ _ = yield_accum (AddMonoid Int32) \result. -- CHECK: [[mat1:v#[0-9]+]]:<16xInt32> = vbroadcast -- CHECK: [[prodj:v#[0-9]+]]:<16xInt32> = %imul [[mat1]] [[mat2j]] -- CHECK: extend [[refj]] [[prodj]] + +"vectorizing through the `tile` combinator and its funny index set" +-- CHECK-LABEL: vectorizing through the `tile` combinator and its funny index set + +%passes vect +_ = yield_accum (AddMonoid Int32) \result. + tile((Fin 256), 32) \set. + for_ i:set. + ix = inject(i, to=(Fin 256)) + result!ix += xs[ix] +-- CHECK: seq (RawFin 0x8) +-- CHECK: seq (RawFin 0x2) +-- CHECK: [[refix:v#[0-9]+]]:(Ref {{v#[0-9]+}} <16xInt32>) = vrefslice +-- CHECK: [[xsix:v#[0-9]+]]:<16xInt32> = +-- CHECK-NEXT: vslice +-- CHECK: extend [[refix]] [[xsix]] |