<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Codegen crash"
   href="https://llvm.org/bugs/show_bug.cgi?id=28328">28328</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Codegen crash
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: PowerPC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rafael.espindola@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>llc -mtriple=powerpc64-pc-linux will crash on

-----------------------------------
%struct.test = type { i64, [8 x i8] }

@gt = common global %struct.test zeroinitializer, align 16

define hidden signext i32 @test1(i32 signext, %struct.test* byval align 16, i32
signext) {
ret i32 0
 }
define void @caller1(i32 signext %z) {
entry:
  %call = tail call signext i32 @test1(i32 signext 0, %struct.test* byval align
16 @gt, i32 signext %z)
  ret void
}
---------------------------------------

The backtrace is


llc: /home/espindola/llvm/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:662:
const llvm::SDValue &llvm::SDNode::getOperand(unsigned int) const: Assertion
`Num < NumOperands && "Invalid child # of SDNode!"' failed.
#0 0x0000000002465b2c llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/espindola/llvm/llvm/lib/Support/Unix/Signals.inc:402:11
#1 0x0000000002466019 PrintStackTraceSignalHandler(void*)
/home/espindola/llvm/llvm/lib/Support/Unix/Signals.inc:470:1
#2 0x00000000024646f3 llvm::sys::RunSignalHandlers()
/home/espindola/llvm/llvm/lib/Support/Signals.cpp:45:5
#3 0x0000000002466364 SignalHandler(int)
/home/espindola/llvm/llvm/lib/Support/Unix/Signals.inc:256:1
#4 0x00007f9d9ca53a00 __restore_rt (/lib64/libpthread.so.0+0x10a00)
#5 0x00007f9d9b5cfa28 __GI_raise (/lib64/libc.so.6+0x34a28)
#6 0x00007f9d9b5d162a __GI_abort (/lib64/libc.so.6+0x3662a)
#7 0x00007f9d9b5c8227 __assert_fail_base (/lib64/libc.so.6+0x2d227)
#8 0x00007f9d9b5c82d2 (/lib64/libc.so.6+0x2d2d2)
#9 0x000000000093020a llvm::SDNode::getOperand(unsigned int) const
/home/espindola/llvm/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:663:12
#10 0x000000000132d3bf
llvm::PPCTargetLowering::createMemcpyOutsideCallSeq(llvm::SDValue,
llvm::SDValue, llvm::SDValue, llvm::ISD::ArgFlagsTy, llvm::SelectionDAG&,
llvm::SDLoc const&) const
/home/espindola/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:4896:25
#11 0x0000000001322c31 llvm::PPCTargetLowering::LowerCall_64SVR4(llvm::SDValue,
llvm::SDValue, unsigned int, bool, bool, bool,
llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&,
llvm::SmallVectorImpl<llvm::SDValue> const&,
llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::SDLoc const&,
llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&,
llvm::ImmutableCallSite*) const
/home/espindola/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5189:32
#12 0x0000000001320f60
llvm::PPCTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&,
llvm::SmallVectorImpl<llvm::SDValue>&) const
/home/espindola/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:4653:14
#13 0x000000000222d1e9
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&)
const
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7676:15
#14 0x000000000224a870
llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&,
llvm::BasicBlock const*)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5713:3
#15 0x000000000223531d
llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, llvm::SDValue,
bool, llvm::BasicBlock const*)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5806:40
#16 0x000000000221fe18 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6373:1
#17 0x00000000022154e7 llvm::SelectionDAGBuilder::visit(unsigned int,
llvm::User const&)
/home/espindola/llvm/llvm/include/llvm/IR/Instruction.def:186:1
#18 0x00000000022142e9 llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:980:3
#19 0x00000000022c8024
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:672:10
#20 0x00000000022c7ee6
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1486:5
#21 0x00000000022c5d55
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/espindola/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:506:36
#22 0x00000000012d6f28 (anonymous
namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/espindola/llvm/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:83:12
#23 0x0000000001b63e86
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/espindola/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:8
#24 0x0000000001ed4eaf llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/espindola/llvm/llvm/lib/IR/LegacyPassManager.cpp:1526:27
#25 0x0000000001ed51c5 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/espindola/llvm/llvm/lib/IR/LegacyPassManager.cpp:1547:16
#26 0x0000000001ed595a (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/espindola/llvm/llvm/lib/IR/LegacyPassManager.cpp:1603:27
#27 0x0000000001ed5486 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/espindola/llvm/llvm/lib/IR/LegacyPassManager.cpp:1706:16
#28 0x0000000001ed5e71 llvm::legacy::PassManager::run(llvm::Module&)
/home/espindola/llvm/llvm/lib/IR/LegacyPassManager.cpp:1737:3
#29 0x000000000086247e compileModule(char**, llvm::LLVMContext&)
/home/espindola/llvm/llvm/tools/llc/llc.cpp:483:42
#30 0x00000000008609cd main /home/espindola/llvm/llvm/tools/llc/llc.cpp:260:13
#31 0x00007f9d9b5bb580 __libc_start_main (/lib64/libc.so.6+0x20580)
#32 0x0000000000860589 _start (./bin/llc+0x860589)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>