Simplify StgCase when all alternatives are the case binder
Nudged by rwbarton, simponpj writes in ticket:13536#comment:134912:
Yes. It's really
case e of w { p1 -> w; ...; pn -> w }
===>
e
(Core has a more general version involving strictness on x.)
I don't know how much it happens in practice. It would not be hard to include this in StgCse though.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | rwbarton |
Operating system | |
Architecture |