Commit ad0e1c9c authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add quot and rem to the integerConstantFolding test

parent 8111e64f
......@@ -28,5 +28,7 @@ integerConstantFolding:
$(call CHECK,\<196\>,divModInteger)
$(call CHECK,\<1600976\>,shiftLInteger)
$(call CHECK,\<6253\>,shiftRInteger)
$(call CHECK,\<641\>,quotInteger)
$(call CHECK,\<68\>,remInteger)
./integerConstantFolding
......@@ -44,6 +44,8 @@ main = do p "plusInteger" plusInteger
p "divModInteger" divModInteger
p "shiftLInteger" shiftLInteger
p "shiftRInteger" shiftRInteger
p "quotInteger" quotInteger
p "remInteger" remInteger
where p :: Show a => String -> a -> IO ()
p str x = putStrLn (str ++ ": " ++ show x)
......@@ -151,3 +153,9 @@ shiftLInteger = 100061 `shiftL` 4
shiftRInteger :: Integer
shiftRInteger = 100062 `shiftR` 4
quotInteger :: Integer
quotInteger = 100063 `quot` 156
remInteger :: Integer
remInteger = 100064 `rem` 156
......@@ -38,3 +38,5 @@ quotRemInteger: (813,60)
divModInteger: (219,196)
shiftLInteger: 1600976
shiftRInteger: 6253
quotInteger: 641
remInteger: 68
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment