Skip to content

Vectorizer: add tests #3456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 17, 2025
Prev Previous commit
Next Next commit
Fix asssertion failure when vectorizing unboxed int32
  • Loading branch information
gretay-js committed Jan 15, 2025
commit ce35e17e891914b7da2e3ef85a68e383e3d8e35b
8 changes: 5 additions & 3 deletions backend/vectorize_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ let vectorize_machtypes (pack : Reg.t list) : Cmm.machtype_component =
Printreg.reglist pack;
match hd.typ, List.length pack with
| Addr, _ -> Misc.fatal_errorf "Unexpected machtype for %a" Printreg.reg hd
| (Int | Float), 2 | Float32, 4 ->
(* allows subregs, width should be correct by construction of [Group]. *)
| Float, 2 | Float32, 4 -> Vec128
| Int, _ ->
(* [Int] may be used for int32, width should be correct by construction of
[Group]. *)
Vec128
| Val, 2 -> Valx2
| (Val | Int | Float | Float32), n ->
| (Val | Float | Float32), n ->
Misc.fatal_errorf "Unexpected pack size %d for %a" n Printreg.reglist pack
| Vec128, _ | Valx2, _ ->
Misc.fatal_errorf "Unexpected machtype for %a" Printreg.reg hd)
Loading