[LlvmCodeGen] Fixes for Int8#/Word8#

Authored by michalt on Nov 6 2018, 2:53 PM.



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: Michal Terepeta <michal.terepeta@gmail.com>

Test Plan

manually run tests with WAY=llvm

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
michalt created this revision.Nov 6 2018, 2:53 PM
michalt updated the Trac tickets for this revision.Nov 6 2018, 2:53 PM
bgamari accepted this revision.Nov 7 2018, 7:02 AM

Thank you for handling this so quickly!


That was easy :)

This revision is now accepted and ready to land.Nov 7 2018, 7:02 AM
This revision was automatically updated to reflect the committed changes.