#6158: GHC Causes opt to crash under LLVM 3.1 due to non const memcpy offset
---------------------------------+------------------------------------------
Reporter: Axman6 | Owner: dterei
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (LLVM) | Version: 7.4.1
Resolution: fixed | Keywords: llvm memcpy
Os: MacOS X | Architecture: x86_64 (amd64)
Failure: Compile-time crash | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
---------------------------------+------------------------------------------
Changes (by dterei):
* status: new => closed
* resolution: => fixed
Comment:
OK fixed. Damn LLVM doesn't like this code anymore:
{{{
%a = i32 1
call ccc llvm.memcpy.p0i8.p0i8.i64( i8* %x, i8* %y, i64 %z, i32 %a, i1 0)
}}}
As while the alignment (a) is constant the fact it's in a variable throws
LLVM off in 3.1. A work around for now is to run LLVM's constant
propigation pass at the very start to inline the variable. e.g do this:
{{{
$ ghc --make testcase.hs -fllvm -O2 -optlo-constprop -optlo-O3
}}}
and it should compile fine.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6158#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs