[project @ 2000-10-11 16:45:53 by sewardj]
[ghc-hetmet.git] / ghc / compiler / prelude / PrimOp.lhs
index e6ced5a..5d97207 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}
 
 
@@ -543,7 +543,8 @@ getPrimOpResultInfo op
        let rep = typePrimRep ty in
        case rep of
           PtrRep -> case splitAlgTyConApp_maybe ty of
-                       Nothing -> panic "getPrimOpResultInfo"
+                       Nothing -> pprPanic "getPrimOpResultInfo" 
+                                            (ppr ty <+> ppr op)
                        Just (tc,_,_) -> ReturnsAlg tc
           other -> ReturnsPrim other
 \end{code}