[GHC] #9929: New alias handling not compatible with LLVM 3.4

GHC ghc-devs at haskell.org
Fri Dec 26 19:20:11 UTC 2014


#9929: New alias handling not compatible with LLVM 3.4
-------------------------------------+-------------------------------------
              Reporter:  rwbarton    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  high        |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.10.1-rc1
  (LLVM)                             |         Keywords:
            Resolution:              |     Architecture:  x86_64 (amd64)
      Operating System:  Linux       |       Difficulty:  Unknown
       Type of failure:  Compile-    |       Blocked By:
  time crash                         |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 A small test case for LLVM's behavior here:
 {{{
 ; test.ll
 @foo$def = internal constant i64 123, section ".mysection"
 @foo = alias i8* bitcast (i64* @foo$def to i8*)

 $ opt-3.4 -O1 test.ll -o test.lo && llc-3.4 test.lo -o test.s && cat
 test.s
 }}}

 LLVM 3.3 and 3.4 both put `foo` in the `.rodata` section, while 3.5 puts
 it in `.mysection`. (So perhaps this behavior was considered to be a bug,
 and fixed in 3.5.) For some reason, GHC's usage of LLVM 3.3 is okay
 nevertheless (this isn't the way that GHC invokes opt/llc and my guess is
 that the difference is due to different optimizations enabled by default
 in LLVM 3.3).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9929#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list