<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 --- - PowerPC: crash with --target=powerpc -mcpu=power8"
href="https://llvm.org/bugs/show_bug.cgi?id=25747">25747</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>PowerPC: crash with --target=powerpc -mcpu=power8
</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>anton@samba.org
</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>I wasn't paying attention when I used the 32bit --target=powerpc with
-mcpu=power8. It would be better if we failed gracefully though.
# cat test.c
static int a[1024];
void *foo(unsigned int x)
{
unsigned long i;
for (i = 0; i < 1024; i++)
a[i] = x;
return a;
}
# clang --target=powerpc -O3 -mcpu=power8 -S test.c
0 clang-3.8 0x0000000010e18a80 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 128
1 clang-3.8 0x0000000010e18ec0
2 clang-3.8 0x0000000010e167fc llvm::sys::RunSignalHandlers() + 124
3 clang-3.8 0x0000000010e16a24
4 0x00003fff99f20478 __kernel_sigtramp_rt64 + 0
5 clang-3.8 0x0000000010517d30
llvm::PPCGenRegisterInfo::getSubClassWithSubReg(llvm::TargetRegisterClass
const*, unsigned int) const + 16
6 clang-3.8 0x0000010030671d00
llvm::PPCGenRegisterInfo::getSubClassWithSubReg(llvm::TargetRegisterClass
const*, unsigned int) const + 538288096
7 clang-3.8 0x00000000114cc728
8 clang-3.8 0x00000000114bd0c0
llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineBasicBlock::bundle_iterator<llvm::MachineInstr,
llvm::ilist_iterator<llvm::MachineInstr> >&) + 752
9 clang-3.8 0x0000000011445534 llvm::SelectionDAGISel::CodeGenAndEmitDAG() +
788
10 clang-3.8 0x0000000011445874
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 212
11 clang-3.8 0x0000000011449108
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1128
12 clang-3.8 0x000000001144ab40
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1024
13 clang-3.8 0x00000000104b0dd0
14 clang-3.8 0x0000000010771c58
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 216
15 clang-3.8 0x0000000010a9178c
llvm::FPPassManager::runOnFunction(llvm::Function&) + 620
16 clang-3.8 0x0000000010a91ccc llvm::FPPassManager::runOnModule(llvm::Module&)
+ 76
17 clang-3.8 0x0000000010a91264
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1012
18 clang-3.8 0x0000000010a914ec llvm::legacy::PassManager::run(llvm::Module&) +
28
19 clang-3.8 0x0000000010f4f62c
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 2892
20 clang-3.8 0x000000001150415c
21 clang-3.8 0x00000000117ef788 clang::ParseAST(clang::Sema&, bool, bool) +
1224
22 clang-3.8 0x000000001124be78 clang::ASTFrontendAction::ExecuteAction() + 104
23 clang-3.8 0x00000000115055d4 clang::CodeGenAction::ExecuteAction() + 36
24 clang-3.8 0x000000001124d798 clang::FrontendAction::Execute() + 472
25 clang-3.8 0x0000000011222340
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 336
26 clang-3.8 0x00000000112de61c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2204
27 clang-3.8 0x0000000010467d08 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 2472
28 clang-3.8 0x000000001043ec18 main + 1304
29 libc.so.6 0x00003fff99943500
30 libc.so.6 0x00003fff99943734 __libc_start_main + 180
Stack dump:
0. Program arguments: /home/anton/llvm.install/bin/clang-3.8 -cc1 -triple
powerpc -S -disable-free -disable-llvm-verifier -main-file-name f.c
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -target-cpu pwr8 -dwarf-column-info
-coverage-file /tmp/f.c -resource-dir
/home/anton/llvm.install/bin/../lib/clang/3.8.0 -O3 -fdebug-compilation-dir
/tmp -ferror-limit 19 -fmessage-length 80 -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o f.s -x c /tmp/f.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/tmp/f.c'.
4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function
'@foo'
clang-3.8: error: unable to execute command: Segmentation fault
clang-3.8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0 (git://github.com/llvm-mirror/clang.git
fddc9526a3747715abdca7412c088c88ea3ba318)
(git://github.com/llvm-mirror/llvm.git
b590f81c153265bc3ce6173161642b7fbc5b8a1c)
Target: powerpc
Thread model: posix
InstalledDir: /home/anton/llvm.install/bin
clang-3.8: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.</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>