diff options
author | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-07-22 17:33:32 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-07-22 17:33:32 +0200 |
commit | f629442be93f4608e6bb53bfe2264a406230c546 (patch) | |
tree | af435a3efbb1167abec51b63879d2b47c98f0080 /compiler/llvmGen | |
parent | 4ea9311cc5c3b99ea6915bee23f0a6776731f20e (diff) | |
download | haskell-f629442be93f4608e6bb53bfe2264a406230c546.tar.gz |
Fix a major copy'n'paste error in LLVM CodeGen
Summary:
In D4592, `AddWordC` is lowered as an unsigned subtraction instead
of an unsigned addition when compiling with LLVM.
This patch rectifies that.
Reviewers: angerman, bgamari, monoidal
Reviewed By: angerman, bgamari, monoidal
Subscribers: osa1, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4969
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 678fffa4c1..f25cb79367 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -804,7 +804,7 @@ cmmPrimOpFunctions mop = do ++ showSDoc dflags (ppr $ widthToLlvmInt w) MO_Add2 w -> fsLit $ "llvm.uadd.with.overflow." ++ showSDoc dflags (ppr $ widthToLlvmInt w) - MO_AddWordC w -> fsLit $ "llvm.usub.with.overflow." + MO_AddWordC w -> fsLit $ "llvm.uadd.with.overflow." ++ showSDoc dflags (ppr $ widthToLlvmInt w) MO_SubWordC w -> fsLit $ "llvm.usub.with.overflow." ++ showSDoc dflags (ppr $ widthToLlvmInt w) |