diff options
author | Michal Terepeta <michal.terepeta@gmail.com> | 2015-07-20 15:43:31 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-07-20 16:43:34 +0200 |
commit | 82ffc80df573512f788524c4616db3c08fc9f125 (patch) | |
tree | bf35684068e0376bb30013d22288a81966427965 /compiler/codeGen/StgCmmPrim.hs | |
parent | 029367e5894d4ac3ea3845f39f2cc1b5a6a9fac1 (diff) | |
download | haskell-82ffc80df573512f788524c4616db3c08fc9f125.tar.gz |
LlvmCodeGen: add support for MO_U_Mul2 CallishMachOp
This adds support MO_U_Mul2 to the LLVM backend by simply using 'mul'
instruction but operating at twice the bit width (e.g., for 64 bit
words we will generate mul that operates on 128 bits and then extract
the two 64 bit values for the result of the CallishMachOp).
Test Plan: validate
Reviewers: rwbarton, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1068
GHC Trac Issues: #9430
Diffstat (limited to 'compiler/codeGen/StgCmmPrim.hs')
-rw-r--r-- | compiler/codeGen/StgCmmPrim.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 563f6dcc4a..243e2a32ac 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -823,7 +823,8 @@ callishPrimOpSupported dflags op || llvm -> Left (MO_SubIntC (wordWidth dflags)) | otherwise -> Right genericIntSubCOp - WordMul2Op | ncg && x86ish -> Left (MO_U_Mul2 (wordWidth dflags)) + WordMul2Op | ncg && x86ish + || llvm -> Left (MO_U_Mul2 (wordWidth dflags)) | otherwise -> Right genericWordMul2Op _ -> pprPanic "emitPrimOp: can't translate PrimOp " (ppr op) |