[GHC] #7571: LLVM codegen does not handle integer literals in branch conditionals.
GHC
cvs-ghc at haskell.org
Tue Jan 22 21:01:26 CET 2013
#7571: LLVM codegen does not handle integer literals in branch conditionals.
---------------------------------+------------------------------------------
Reporter: thoughtpolice | Owner: thoughtpolice
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler (LLVM) | Version: 7.7
Keywords: llvm, codegen | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Compile-time crash
Difficulty: Unknown | Testcase:
Blockedby: 7573, 7590 | Blocking: 7588, 7589
Related: #7574, #7575 |
---------------------------------+------------------------------------------
Comment(by mad.one@…):
commit 14c01e0966da2edf9b770651ce1a4ca6a206eb20
{{{
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
We need to be sure that when generating code for literals, we properly
narrow
the type of the literal to i1. See Note [Literals and branch
conditions] in the
LlvmCodeGen.CodeGen module.
This occurs rarely as the optimizer will remove conditional branches
with
literals, however we can get this situation occurring with hand
written Cmm
code.
This fixes Trac #7571.
Signed-off-by: David Terei <davidterei at gmail.com>
compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 86
+++++++++++++++++++++++++------
1 files changed, 70 insertions(+), 16 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7571#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list