[project @ 2000-09-06 10:21:17 by simonmar]
authorsimonmar <unknown>
Wed, 6 Sep 2000 10:21:17 +0000 (10:21 +0000)
committersimonmar <unknown>
Wed, 6 Sep 2000 10:21:17 +0000 (10:21 +0000)
recode primOpOkForSpeculation in terms of primOpIsCheap and primOpCanFail.

ghc/compiler/prelude/PrimOp.lhs

index e6ced5a..9e946d8 100644 (file)
@@ -365,7 +365,7 @@ See also @primOpIsCheap@ (below).
 primOpOkForSpeculation :: PrimOp -> Bool
        -- See comments with CoreUtils.exprOkForSpeculation
 primOpOkForSpeculation op 
-  = not (primOpCanFail op || primOpHasSideEffects op || primOpOutOfLine op)
+  = primOpIsCheap op && not (primOpCanFail op)
 \end{code}