Skip to content

cmm common block not eliminated

For the toTuple# function (in the attached file) GHC generates a cmm switch statement, with all the alternatives, unsurprisingly, the same. Yet, cmm common block elimination does not kick in.

In this particular example, the whole case statement could be annihilated, because all alternatives lead to the same code.

BTW, this is how they match in France.

type alt = A of int | B of int | C of int | D of int
let g x = match x with A v | B v  | C v | D v -> v
Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information