
That doesn't look right. Are you using -O? If so, perhaps open a ticket explaining how to reproduce, and including the results of -ddump-cmm. (Don't use module Main, because it's irrelevant to this question, and generate a certain amount of auxiliary goop.) Thanks SImon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Karel | Gardas | Sent: 09 March 2014 21:40 | To: Johan Tibell | Cc: ghc-devs@haskell.org | Subject: Re: Optimized Cmm containing useless blocks | | | If I may add to this, then I'm curious why there is something like: | | I64[BaseReg + 784] = I64[BaseReg + 784]; | | presented in Cmm optimized code. Since I don't know Cmm enough I've | verified if the semantics is really C like by looking into generated asm | and indeed it looks so. This costs 5 isns of sparc asm btw. | | If someone is interested to duplicate this, then use sparc or ppc 32 bit | registerised target and Haskell code: | | module Main where | | import Data.Int | | main = print ( ( 2 ^ 6 ) :: Int64 ) | | Karel | | On 03/ 8/14 09:21 AM, Johan Tibell wrote: | > While looking at some generated Cmm I saw things like this | > | > c1Cm: | > goto c1Cq; | > c1Cq: | > | > i.e. useless basic blocks that haven't been optimized away. Is this to | > be expected? | > | > -- Johan | > | > | > | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs@haskell.org | > http://www.haskell.org/mailman/listinfo/ghc-devs | | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs