Skip to content
  • Michal Terepeta's avatar
    [LlvmCodeGen] Fixes for Int8#/Word8# · f424515f
    Michal Terepeta authored and Ben Gamari's avatar Ben Gamari committed
    
    
    This fixes two isssues:
    
    - Using bitcast for MO_XX_Conv
      Arguments to a bitcast must be of the same size. We should be using
      `trunc` and `zext` instead.
    
    - Using unsupported MO_*_QuotRem for LLVM
      The two primops `MO_*_QuotRem` are not supported by the LLVM backend,
    so
      we shouldn't use them for `Int8#`/`Word8#` (just as we do not use
    them for
      `Int#`/`Word#`).
    
    Signed-off-by: default avatarMichal Terepeta <michal.terepeta@gmail.com>
    
    Test Plan: manually run tests with WAY=llvm
    
    Reviewers: bgamari, simonmar
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15864
    
    Differential Revision: https://phabricator.haskell.org/D5304
    f424515f