[LlvmCodeGen] Fixes for Int8#/Word8#

Authored by michalt on Nov 7 2018, 7:03 AM.

Description

[LlvmCodeGen] Fixes for Int8#/Word8#

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

Reviewers: bgamari, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: Trac #15864

Differential Revision: https://phabricator.haskell.org/D5304

Details

Committed
bgamariNov 7 2018, 7:09 AM
Reviewer
bgamari
Differential Revision
D5304: [LlvmCodeGen] Fixes for Int8#/Word8#
Parents
rGHC406978c478e4: CircleCI: Build DWARF-enabled Linux bindists
Branches
Unknown
Tags
Unknown