From: Matthijs Kooijman Date: Wed, 19 Aug 2009 09:56:09 +0000 (+0200) Subject: Don't extra non-representable values in simplres. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=332de8b1e2d6bf8f033e09a30adaeecd1e023575;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Don't extra non-representable values in simplres. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index ec7a66b..2f74be8 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -651,7 +651,10 @@ simplrestop expr@(Lam _ _) = return expr simplrestop expr@(Let _ _) = return expr simplrestop expr = do local_var <- Trans.lift $ is_local_var expr - if local_var + -- Don't extract values that are not representable, to prevent loops with + -- inlinenonrep + repr <- isRepr expr + if local_var || not repr then return expr else do