Handle TagToEnum in the same big case as the other primops
Before, it was a panic because it was handled above. But there must have been an error in my reasoning (another caller?) because #17442 reported the panic was hit. But, rather than figuring out what happened, I can just make it impossible by construction. By adding just a bit more bureaucracy in the return types, I can handle TagToEnum in the same case as all the others, so the big case is is now total, and the panic is removed. Fixes #17442 (cherry picked from commit 22c0bdc3)
Showing
- compiler/GHC/StgToCmm/Prim.hs 46 additions, 33 deletionscompiler/GHC/StgToCmm/Prim.hs
- testsuite/tests/cmm/should_compile/T17442.hs 43 additions, 0 deletionstestsuite/tests/cmm/should_compile/T17442.hs
- testsuite/tests/cmm/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/cmm/should_compile/all.T
Loading
Please register or sign in to comment