[LLVMbugs] [Bug 10799] New: CodegenOpt::None and llvm.gcroot trigger failure in X86ISelDAG

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Aug 28 13:30:08 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10799

           Summary: CodegenOpt::None and llvm.gcroot trigger failure in
                    X86ISelDAG
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: eschew at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7167)
 --> (http://llvm.org/bugs/attachment.cgi?id=7167)
minimal testcase

The attached testcase triggers failure in X86ISelDAG in LLVM 2.9 and trunk
(r138727) when CodeGenOpt level is None.  I can reproduce this bug on LLVM 2.4,
but not 2.3 (under -fast instead of -O0).

$ ~/llvm/trunk/bin/llc -O0 test.ll
llc: /home/benkarel/llvm/src/trunk/include/llvm/Support/Casting.h:194: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::FrameIndexSDNode, Y = llvm::SDNode*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
0  llc 0x088c31b8
Stack dump:
0.    Program arguments: /home/benkarel/llvm/trunk/bin/llc -O0 test.ll 
1.    Running pass 'Function Pass Manager' on module 'test.ll'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
Aborted

This bug only seems to be triggered under a specific set of circumstances:

  1) CodegenOpt level must be None
  2) The first argument to llvm.gcroot must be a bitcast of an alloca. The bug
is not triggered if an alloca value is passed directly.
  3) The GC plugin for the function must (I think) be one that emits stack
maps. The ocaml GC and my custom GC both trigger the bug, but the shadow-stack
GC does not.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list