-cmmCheckMachOp :: MachOp -> [CmmExpr] -> CmmLint MachRep
-cmmCheckMachOp op args@[CmmReg reg, CmmLit (CmmInt i _)]
- | isWordOffsetReg reg && isOffsetOp op && i `rem` fromIntegral wORD_SIZE /= 0
- = cmmLintDubiousWordOffset (CmmMachOp op args)
-cmmCheckMachOp op [lit@(CmmLit (CmmInt { })), reg@(CmmReg _)]
- = cmmCheckMachOp op [reg, lit]
-cmmCheckMachOp op@(MO_U_Conv from to) args
- | isFloatingRep from || isFloatingRep to
- = cmmLintErr (text "unsigned conversion from/to floating rep: "
- <> ppr (CmmMachOp op args))
-cmmCheckMachOp op _args
- = return (resultRepOfMachOp op)
-
-isWordOffsetReg :: CmmReg -> Bool
-isWordOffsetReg (CmmGlobal Sp) = True
--- No warnings for unaligned arithmetic, which is used to tag dynamic constructor closures.
---isWordOffsetReg (CmmGlobal Hp) = True
-isWordOffsetReg _ = False
+cmmCheckMachOp :: MachOp -> [CmmExpr] -> [CmmType] -> CmmLint CmmType
+cmmCheckMachOp op [lit@(CmmLit (CmmInt { })), reg@(CmmReg _)] tys
+ = cmmCheckMachOp op [reg, lit] tys
+cmmCheckMachOp op _ tys
+ = return (machOpResultType op tys)