[GHC] #7571: LLVM codegen does not handle integer literals in branch conditionals.

GHC cvs-ghc at haskell.org
Sun Jan 13 05:46:09 CET 2013


#7571: LLVM codegen does not handle integer literals in branch conditionals.
--------------------------------+-------------------------------------------
Reporter:  thoughtpolice        |          Owner:  thoughtpolice   
    Type:  bug                  |         Status:  patch           
Priority:  normal               |      Component:  Compiler (LLVM) 
 Version:  7.6.1                |       Keywords:  llvm, codegen   
      Os:  Unknown/Multiple     |   Architecture:  Unknown/Multiple
 Failure:  Building GHC failed  |      Blockedby:                  
Blocking:                       |        Related:                  
--------------------------------+-------------------------------------------
Changes (by thoughtpolice):

  * status:  new => patch


Comment:

 I have verified my patch fixes the build of StdStgThunks.cmm on my ODROID.
 More ARM build failures are still in my way, but nonetheless this patch
 should be merged for everyone since it fixes compiler bootstrapping with
 LLVM.

 I also added a hefty note explaining the change.

 {{{

 commit 0de9754d06c8ca57e781bb829931ff7cdc861344
 Author: Austin Seipp <mad.one at gmail.com>
 Date:   Sun Jan 13 04:34:05 2013 +0000

     Ensure the LLVM codegen correctly handles literals in a branch. #7571

     This was causing a failure to build GHC HEAD on my ODROID-U2 ARM
     machine. In general, hand-written C-- like in StgStdThunks.cmm would
     have tripped this on any platform, meaning bootstrapping with the
     LLVM backend was probably broken before.

     In general, we need to be sure that when generating code for literals,
     we properly narrow the type of the literal to i1. See Note [Integer
     literals and branch conditionals] in the LlvmCodeGen.CodeGen module.

     This fixes Trac #7571.

     Signed-off-by: Austin Seipp <mad.one at gmail.com>

 }}}

 If someone could review/merge, I'd appreciate it a lot.

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



More information about the ghc-tickets mailing list