[LLVMbugs] [Bug 3318] New: Aggregate return error in CCState::AnalyzeCallResult

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 12 11:47:09 PST 2009


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

           Summary: Aggregate return error in CCState::AnalyzeCallResult
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: markleone at gmail.com
                CC: llvmbugs at cs.uiuc.edu


I'm getting an error ("Call result #2 has unhandled type i32") for a function
that returns an aggregate in CCState::AnalyzeCallResult.  For example,

declare [3 x i32] @test1()

define void @test2() {
        %x = call [3 x i32] @test1()
        ret void
}

The error is also triggered for aggregates like {i32, i32, i32}, but it works
fine for [2 x i32] or {i32, i32}.  Here's the stack trace:

 llvm::CCState::AnalyzeCallResult(llvm::CallSDNode*, bool (*)(unsigned int,
llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy,
llvm::CCState&)) + 309
 llvm::X86TargetLowering::LowerCallResult(llvm::SDValue, llvm::SDValue,
llvm::CallSDNode*, unsigned int, llvm::SelectionDAG&) + 138
 llvm::X86TargetLowering::LowerCALL(llvm::SDValue, llvm::SelectionDAG&) + 7702
 llvm::X86TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) +
1761
 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type
llvm::cast<llvm::SubprogramDesc, llvm::DebugInfoDesc*>(llvm::DebugInfoDesc*
const&) + 45271
 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type
llvm::cast<llvm::SubprogramDesc, llvm::DebugInfoDesc*>(llvm::DebugInfoDesc*
const&) + 223622
 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type
llvm::cast<llvm::SubprogramDesc, llvm::DebugInfoDesc*>(llvm::DebugInfoDesc*
const&) + 224700
 llvm::SelectionDAG::Legalize(bool) + 64
 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 2080
 llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::ilist_iterator<llvm::Instruction>,
llvm::ilist_iterator<llvm::Instruction>) + 575
 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::TargetInstrInfo const&)
+ 2100


-- 
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