Skip to content

Use arithmetic right shift to sign-extend

Matthew Craven requested to merge wip/weird-sign-extends into master

In a few places we use the following slightly strange way of getting the sign extension of an int x: negateInt# (x <# 0#)

This patch replaces these with an arithmetic right shift of the appropriate size, resulting in slightly smaller code.

Merge request reports