<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 when combining add+load+and+load"
href="https://llvm.org/bugs/show_bug.cgi?id=27390">27390</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[PowerPC] crash when combining add+load+and+load
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</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>koriakin@0x04.net
</td>
</tr>
<tr>
<th>Reporter</th>
<td>koriakin@0x04.net
</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>target datalayout = "e-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux-gnu"
%typ = type { i32, i32 }
; Function Attrs: uwtable
define signext i32 @_Z8access_pP1Tc(%typ* %p, i8 zeroext %type) {
%b = getelementptr inbounds %typ, %typ* %p, i64 0, i32 1
%1 = load i32, i32* %b, align 4
%2 = ptrtoint i32* %b to i64
%3 = and i64 %2, -35184372088833
%4 = inttoptr i64 %3 to i32*
%_msld = load i32, i32* %4, align 4
%zzz = add i32 %1, %_msld
ret i32 %zzz
}
Running llc on current trunk results in:
llc: ../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:882: llvm::SDValue
{anonymous}::DAGCombiner::CombineTo(llvm::SDNode*, const llvm::SDValue*,
unsigned int, bool): Assertion `(!To[i].getNode() || N->getValueType(i) ==
To[i].getValueType()) && "Cannot combine value to value of different type!"'
failed.
#0 0x00007ffb3a4722ed llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/mwk/llvm/llvm/build/../lib/Support/Unix/Signals.inc:322:0
#1 0x00007ffb3a47266a PrintStackTraceSignalHandler(void*)
/home/mwk/llvm/llvm/build/../lib/Support/Unix/Signals.inc:380:0
#2 0x00007ffb3a470dc8 llvm::sys::RunSignalHandlers()
/home/mwk/llvm/llvm/build/../lib/Support/Signals.cpp:44:0
#3 0x00007ffb3a471dec SignalHandler(int)
/home/mwk/llvm/llvm/build/../lib/Support/Unix/Signals.inc:210:0
#4 0x00007ffb38e89330 __restore_rt (/usr/lib/libc.so.6+0x33330)
#5 0x00007ffb38e892a8 __GI_raise (/usr/lib/libc.so.6+0x332a8)
#6 0x00007ffb38e8a72a __GI_abort (/usr/lib/libc.so.6+0x3472a)
#7 0x00007ffb38e821b7 __assert_fail_base (/usr/lib/libc.so.6+0x2c1b7)
#8 0x00007ffb38e82262 (/usr/lib/libc.so.6+0x2c262)
#9 0x00007ffb3a7d8c58 (anonymous
namespace)::DAGCombiner::CombineTo(llvm::SDNode*, llvm::SDValue const*,
unsigned int, bool)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:880:0
#10 0x00007ffb3a7d682c (anonymous
namespace)::DAGCombiner::CombineTo(llvm::SDNode*, llvm::SDValue, bool)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:166:0
#11 0x00007ffb3a7ea651 (anonymous
namespace)::DAGCombiner::visitAND(llvm::SDNode*)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3192:0
#12 0x00007ffb3a7dbbc9 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1381:0
#13 0x00007ffb3a7dc23b (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1454:0
#14 0x00007ffb3a7db61f (anonymous
namespace)::DAGCombiner::Run(llvm::CombineLevel)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1307:0
#15 0x00007ffb3a83dc7d llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults&, llvm::CodeGenOpt::Level)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14834:0
#16 0x00007ffb3aa0bc96 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:835:0
#17 0x00007ffb3aa0ab23
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:681:0
#18 0x00007ffb3aa0ecaf
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1498:0
#19 0x00007ffb3aa099d6
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/mwk/llvm/llvm/build/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:506:0
#20 0x00007ffb42797c08 (anonymous
namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/mwk/llvm/llvm/build/../lib/Target/PowerPC/PPCISelDAGToDAG.cpp:89:0
#21 0x00007ffb3cb5953a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/mwk/llvm/llvm/build/../lib/CodeGen/MachineFunctionPass.cpp:60:0
#22 0x00007ffb3c109ed1 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/mwk/llvm/llvm/build/../lib/IR/LegacyPassManager.cpp:1550:0
#23 0x00007ffb3c10a048 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/mwk/llvm/llvm/build/../lib/IR/LegacyPassManager.cpp:1571:0
#24 0x00007ffb3c10a395 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/mwk/llvm/llvm/build/../lib/IR/LegacyPassManager.cpp:1627:0
#25 0x00007ffb3c10aa47 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/mwk/llvm/llvm/build/../lib/IR/LegacyPassManager.cpp:1730:0
#26 0x00007ffb3c10ac53 llvm::legacy::PassManager::run(llvm::Module&)
/home/mwk/llvm/llvm/build/../lib/IR/LegacyPassManager.cpp:1762:0
#27 0x00000000004260d7 compileModule(char**, llvm::LLVMContext&)
/home/mwk/llvm/llvm/build/../tools/llc/llc.cpp:415:0
#28 0x0000000000424f21 main
/home/mwk/llvm/llvm/build/../tools/llc/llc.cpp:218:0
#29 0x00007ffb38e76710 __libc_start_main (/usr/lib/libc.so.6+0x20710)
#30 0x0000000000423709 _start (/home/mwk/llvm/llvm/build/bin/llc+0x423709)
Stack dump:
0. Program arguments: llc try1.ll
1. Running pass 'Function Pass Manager' on module 'try1.ll'.
2. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on
function '@_Z8access_pP1Tc'
Aborted (core dumped)
It seems LWZU instruction is involved and has wrong types on output. I'll
investigate more.</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>