Optimise calls to tagToEnum#
Ever since we started using Int# to represent booleans unboxed (see PrimBool) we have had lots of code looking like
case tagToEnum# (a ># b) of
False -> e1
True -> e2
It would be better (less code to optimise, more straightforward, more direct) to optimise this to
case a ># b of
DEFAULT -> e1
1# -> e2
Happily, we already have a nice spot to do so: the caseRules function in SimplUtils.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |