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

uni import: splitTerminators crash #33

Open
matsc-at-sics-se opened this issue Jun 5, 2018 · 0 comments
Open

uni import: splitTerminators crash #33

matsc-at-sics-se opened this issue Jun 5, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@matsc-at-sics-se
Copy link
Owner

Reproducer:
wam_body.mir.zip

$ uni import -f wam_body wam_body.mir -o wam_body.uni --target=X86 --explicitcallreg --goal=speed --copyremat --lint
uni: Maybe.fromJust: Nothing

Stems from this piece of code in SplitTerminators.hs:

adjustPhiOperand current b2bs succs mop @ MachineBlockRef {mbrId = parent} =
  let candidateParents = b2bs M.! parent
      realParent = find (\p -> current `elem` (succs M.! p)) candidateParents
  in mop {mbrId = fromJust realParent}

So in one case, no realParent was found.

@matsc-at-sics-se matsc-at-sics-se added the bug Something isn't working label Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant