<html>
    <head>
      <base href="http://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 --- - Assertion `CS->getCalledFunction() && "direct call cannot find callee"' failed."
   href="http://llvm.org/bugs/show_bug.cgi?id=17709">17709</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `CS->getCalledFunction() && "direct call cannot find callee"' failed.
          </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: PTX
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>maemarcus@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>marcusmae@M17xR4:~/forge/bugs$ kernelgen-opt --version
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
  LLVM version 3.4svn
  DEBUG build with assertions.
  Built Oct 18 2013 (16:19:23).
  Default target: x86_64-unknown-linux-gnu
  Host CPU: core-avx-i

marcusmae@M17xR4:~/forge/bugs$ cat fausto_reduced.ll
; ModuleID = '__kernelgen_main_module'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
target triple = "nvptx64-nvidia-cuda"

define linker_private ptx_device { double, double }
@__utils1_MOD_trace(%"struct.array2_complex(kind=8).43.5.57"* noalias %m) {
entry:
  unreachable
}

%struct.descriptor_dimension.0.52 = type { i64, i64, i64 }
%"struct.array2_complex(kind=8).37.18.70" = type { i8*, i64, i64, [2 x
%struct.descriptor_dimension.0.52] }
%"struct.array2_complex(kind=8).43.5.57" = type { i8*, i64, i64, [2 x
%struct.descriptor_dimension.0.52] }
@replacementOfAlloca8 = private global
%"struct.array2_complex(kind=8).37.18.70" zeroinitializer, align 4096

define ptx_kernel void @__kernelgen_main(i32* nocapture %args, i32*) {
entry:
  %1 = tail call ptx_device { double, double } bitcast ({ double, double }
(%"struct.array2_complex(kind=8).43.5.57"*)* @__utils1_MOD_trace to { double,
double }
(%"struct.array2_complex(kind=8).37.18.70"*)*)(%"struct.array2_complex(kind=8).37.18.70"*
noalias @replacementOfAlloca8)
  ret void
}
marcusmae@M17xR4:~/forge/bugs$ kernelgen-llc fausto_reduced.ll -o -
//
// Generated by LLVM NVPTX Back-End
//

.version 3.1
.target sm_20
.address_size 64

.global .align 4096 .b8 replacementOfAlloca8[72];
                                        // @__utils1_MOD_trace
.func  (.param .align 8 .b8 func_retval0[16]) __utils1_MOD_trace(
    .param .b64 __utils1_MOD_trace_param_0
)
{


// BB#0:                                // %entry
}

kernelgen-llc:
/home/marcusmae/rpmbuild/kernelgen/r2190_llvm192445_debug/BUILD/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:483:
unsigned int llvm::NVPTXTargetLowering::getArgumentAlignment(llvm::SDValue,
const llvm::ImmutableCallSite*, llvm::Type*, unsigned int) const: Assertion
`CS->getCalledFunction() && "direct call cannot find callee"' failed.
0  libLLVM-3.4svn.so 0x00007fb3607688b1 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  libLLVM-3.4svn.so 0x00007fb360768b2e
2  libLLVM-3.4svn.so 0x00007fb36076858d
3  libpthread.so.0   0x00007fb35f260a90
4  libc.so.6         0x00007fb35ec624e1 gsignal + 89
5  libc.so.6         0x00007fb35ec63756 abort + 278
6  libc.so.6         0x00007fb35ec5bb74 __assert_fail + 0
7  libc.so.6         0x00007fb35ec5bbb6
8  libLLVM-3.4svn.so 0x00007fb3603e126f
llvm::NVPTXTargetLowering::getArgumentAlignment(llvm::SDValue,
llvm::ImmutableCallSite const*, llvm::Type*, unsigned int) const + 163
9  libLLVM-3.4svn.so 0x00007fb3603e42c7
llvm::NVPTXTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&,
llvm::SmallVectorImpl<llvm::SDValue>&) const + 12237
10 libLLVM-3.4svn.so 0x00007fb3606cb07d
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&)
const + 2699
11 libLLVM-3.4svn.so 0x00007fb3606c37d9
llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, llvm::SDValue,
bool, llvm::MachineBasicBlock*) + 2485
12 libLLVM-3.4svn.so 0x00007fb3606c6787
llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 2341
13 libLLVM-3.4svn.so 0x00007fb3606a0a2a
llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) + 1232
14 libLLVM-3.4svn.so 0x00007fb3606a04c8
llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 140
15 libLLVM-3.4svn.so 0x00007fb3606e7815
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 69
16 libLLVM-3.4svn.so 0x00007fb3606ea41c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2990
17 libLLVM-3.4svn.so 0x00007fb3606e6c1a
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 980
18 libLLVM-3.4svn.so 0x00007fb35fefb349
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
19 libLLVM-3.4svn.so 0x00007fb360169966
llvm::FPPassManager::runOnFunction(llvm::Function&) + 290
20 libLLVM-3.4svn.so 0x00007fb360169ad6
llvm::FPPassManager::runOnModule(llvm::Module&) + 84
21 libLLVM-3.4svn.so 0x00007fb360169e2a
llvm::MPPassManager::runOnModule(llvm::Module&) + 556
22 libLLVM-3.4svn.so 0x00007fb36016a420
llvm::PassManagerImpl::run(llvm::Module&) + 244
23 libLLVM-3.4svn.so 0x00007fb36016a62b llvm::PassManager::run(llvm::Module&) +
39
24 kernelgen-llc     0x000000000040ef08
25 kernelgen-llc     0x000000000040dfe7 main + 237
26 libc.so.6         0x00007fb35ec4fa7c __libc_start_main + 376
27 kernelgen-llc     0x000000000040d929
Stack dump:
0.    Program arguments: kernelgen-llc fausto_reduced.ll -o - 
1.    Running pass 'Function Pass Manager' on module 'fausto_reduced.ll'.
2.    Running pass 'NVPTX DAG->DAG Pattern Instruction Selection' on function
'@__kernelgen_main'
Aborted (core dumped)</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>