summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/ConstantFold.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Opt/ConstantFold.hs')
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index 0d2db119a8..b9b436ffe5 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -559,10 +559,10 @@ primOpRules nm = \case
-- coercions
- Int8ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
- Int16ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
- Int32ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
- Int64ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendIntLit ]
+ Int8ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToIntLit ]
+ Int16ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToIntLit ]
+ Int32ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToIntLit ]
+ Int64ToIntOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToIntLit ]
IntToInt8Op -> mkPrimOpRule nm 1 [ liftLit narrowInt8Lit
, narrowSubsumesAnd IntAndOp IntToInt8Op 8 ]
IntToInt16Op -> mkPrimOpRule nm 1 [ liftLit narrowInt16Lit
@@ -571,16 +571,16 @@ primOpRules nm = \case
, narrowSubsumesAnd IntAndOp IntToInt32Op 32 ]
IntToInt64Op -> mkPrimOpRule nm 1 [ liftLit narrowInt64Lit ]
- Word8ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
+ Word8ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToWordLit
, extendNarrowPassthrough WordToWord8Op 0xFF
]
- Word16ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
+ Word16ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToWordLit
, extendNarrowPassthrough WordToWord16Op 0xFFFF
]
- Word32ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit
+ Word32ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToWordLit
, extendNarrowPassthrough WordToWord32Op 0xFFFFFFFF
]
- Word64ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform extendWordLit ]
+ Word64ToWordOp -> mkPrimOpRule nm 1 [ liftLitPlatform convertToWordLit ]
WordToWord8Op -> mkPrimOpRule nm 1 [ liftLit narrowWord8Lit
, narrowSubsumesAnd WordAndOp WordToWord8Op 8 ]