Where can I stick a dead code elimination rule for quotRemInt#?

19 Sep
2014
19 Sep
'14
7:33 p.m.
As I describe in #9617, GHC's CSE in 7.9 seems to be good enough to let Int and Integer use quot x y = fst (x `quotRem` y) rem x y = snd (x `quotRem` y) And actually get good results in code that uses both the quotient and the remainder. I believe the only thing left to be able to actually implement this is a simple rule to turn a match on quotRemInt# into one on quotInt# or remInt# if only the quotient or only the remainder is used. My question is where I could stick such a rule. Can anyone advise me? All I know is that it has to happen after CSE.
3898
Age (days ago)
3898
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Feuer