Skip to content
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

Bug in ARMv9.4-A specification #21

Open
soomin-kim opened this issue Aug 30, 2024 · 0 comments
Open

Bug in ARMv9.4-A specification #21

soomin-kim opened this issue Aug 30, 2024 · 0 comments

Comments

@soomin-kim
Copy link

Hi,

It seems this line is buggy.

val Reduce__1 : forall 'N 'esize,
  ('N in {16, 32, 64, 128, 256, 512, 1024, 2048} & 'esize in {8, 16, 32, 64} & 'N >= 'esize).
  (ReduceOp, bits('N), int('esize), bool) -> bits('esize)

...

function Reduce__1 (op, input, esize, altfp) = {
    assert(esize == 8 | esize == 16 | esize == 32 | esize == 64);
    result : bits('esize) = undefined;
    if 'N == esize then {
        return(input[esize - 1 .. 0])
    };
    let 'half = DIV('N, 2);
    assert(constraint((('N - 1 - 'half + 1 == 16 | 'N - 1 - 'half + 1 == 32 | 'N - 1 - 'half + 1 == 64 | 'N - 1 - 'half + 1 == 128 | 'N - 1 - 'half + 1 == 256 | 'N - 1 - 'half + 1 == 512 | 'N - 1 - 'half + 1 == 1024 | 'N - 1 - 'half + 1 == 2048) & 'esize in {8, 16, 32, 64} & 'N - 1 - 'half + 1 >= 'esize)));
    ...

In particular, the constraint should include 'N - 1 - 'half + 1 == 8 which can also be valid when 'N == 16 and 'esize == 8.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant