@@ -739,7 +739,7 @@ cgOp (LZExt from ITBig) [x] = do
739739 nx <- unbox (FInt from) x
740740 nx' <- case from of
741741 IT64 -> return nx
742− _ -> inst $ Trunc nx (IntegerType $ itWidth from) []
742+ _ -> inst $ ZExt nx (IntegerType 64) []
743743 mpz <- alloc mpzTy
744744 inst' $ simpleCall "mpz_init_set_ull" [mpz, nx']
745745 box (FInt ITBig) mpz
@@ -747,7 +747,7 @@ cgOp (LSExt from ITBig) [x] = do
747747 nx <- unbox (FInt from) x
748748 nx' <- case from of
749749 IT64 -> return nx
750− _ -> inst $ Trunc nx (IntegerType $ itWidth from) []
750+ _ -> inst $ SExt nx (IntegerType 64) []
751751 mpz <- alloc mpzTy
752752 inst' $ simpleCall "mpz_init_set_sll" [mpz, nx']
753753 box (FInt ITBig) mpz