diff --git a/ghc/compiler/absCSyn/Costs.lhs b/ghc/compiler/absCSyn/Costs.lhs index b6d955c1578eaf74b5b7ca8e2bcb4ff7d903e2b4..24563c7bb008250705b075f6caa57c95fa8bc028 100644 --- a/ghc/compiler/absCSyn/Costs.lhs +++ b/ghc/compiler/absCSyn/Costs.lhs @@ -375,7 +375,6 @@ primOpCosts IntMulOp = Cost (3, 1, 0, 0, 0) + umul_costs primOpCosts IntQuotOp = Cost (3, 1, 0, 0, 0) + div_costs primOpCosts IntRemOp = Cost (3, 1, 0, 0, 0) + rem_costs primOpCosts IntNegOp = Cost (1, 1, 0, 0, 0) -- translates into 1 sub -primOpCosts IntAbsOp = Cost (0, 1, 0, 0, 0) -- abs closure already costed primOpCosts FloatGtOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp primOpCosts FloatGeOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp @@ -460,7 +459,7 @@ data PrimOp -- but these take more than that; see special cases in primOpCosts -- I counted the generated ass. instructions for these -> checked | IntMulOp | IntQuotOp - | IntRemOp | IntNegOp | IntAbsOp + | IntRemOp | IntNegOp -- Rest is unchecked so far -- HWL diff --git a/ghc/compiler/nativeGen/AsmCodeGen.lhs b/ghc/compiler/nativeGen/AsmCodeGen.lhs index abfb793e2c9117ed082c35fc020db4256a01b8fe..1a08d461c73a7575092e728ea523901e2e8daf64 100644 --- a/ghc/compiler/nativeGen/AsmCodeGen.lhs +++ b/ghc/compiler/nativeGen/AsmCodeGen.lhs @@ -209,7 +209,6 @@ primOpt primOpt op arg@[StInt x] = case op of IntNegOp -> StInt (-x) - IntAbsOp -> StInt (abs x) _ -> StPrim op arg primOpt op args@[StInt x, StInt y] diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index cbfe9dc3448ddd9e960a8fb09e2e42b60cbd0ecc..14c2b8a1b7e8db4f384a0bd5599b6194d89cef93 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -298,7 +298,6 @@ getRegister (StDouble d) getRegister (StPrim primop [x]) -- unary PrimOps = case primop of IntNegOp -> trivialUCode (NEG Q False) x - IntAbsOp -> trivialUCode (ABS Q) x NotOp -> trivialUCode NOT x @@ -536,7 +535,6 @@ getRegister (StDouble d) getRegister (StPrim primop [x]) -- unary PrimOps = case primop of IntNegOp -> trivialUCode (NEGI L) x - IntAbsOp -> absIntCode x NotOp -> trivialUCode (NOT L) x