Skip to content

[BUG] Simplify Case #564

@noiioiu

Description

@noiioiu

Description
In some cases, simplifyOpenExp tries to look up a nonexistent key, causing the following error:

acc-bug: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
  error, called at libraries/ghc-internal/src/GHC/Internal/Data/Maybe.hs:150:21 in ghc-internal:GHC.Internal.Data.Maybe
  fromJust, called at src/Data/Array/Accelerate/Trafo/Simplify.hs:345:64 in accelerate-1.3.0.0-Gvlh350uUVM380ldksDauS:Data.Array.Accelerate.Trafo.Simplify

Steps to reproduce
Run this program.

Expected behaviour
It should print 32 lines each containing 0. Removing the Foo1_ constructor causes it to work as expected.

Your environment

  • Accelerate: commit 45c3abe
  • Accelerate backend(s): All (this bug appears to be backend-independent, tested with interpreter, llvm-native, and llvm-ptx)
  • GHC: 9.10.3
  • OS: GNU/Linux-aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions