Skip to content
  • rwbarton's avatar
    Use isTrue# around primitive comparisons in integer-gmp · 7e70c063
    rwbarton authored
    Summary:
    The form
      case na# ==# nb# of
        0# -> ...
        _  -> ...
    sometimes generates convoluted assembly, see #10676.
    timesInt2Integer was the most spectacular offender, especially as
    it is a rather cheap function overall (no calls to gmp).
    
    I checked a few instances and some of the old generated assembly
    was fine already, but I changed them all for consistency. The new
    form is also more consistent with use of these primops in general.
    
    Test Plan: validate
    
    Reviewers: hvr, bgamari, goldfire, austin
    
    Reviewed By: hvr
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1094
    7e70c063