<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 --- - instcombine/const folding segfaults with attached module"
href="https://llvm.org/bugs/show_bug.cgi?id=28725">28725</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>instcombine/const folding segfaults with attached module
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>haris@nvidia.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>Created <span class=""><a href="attachment.cgi?id=16814" name="attach_16814" title="reduced module">attachment 16814</a> <a href="attachment.cgi?id=16814&action=edit" title="reduced module">[details]</a></span>
reduced module
The attached module fails instcombine with trunk while constant folding.
opt -instcombine crash.bc
#0 0x00000000015932e5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/opt+0x15932e5)
#1 0x0000000001591316 llvm::sys::RunSignalHandlers()
(/usr/local/bin/opt+0x1591316)
#2 0x0000000001591515 SignalHandler(int) (/usr/local/bin/opt+0x1591515)
#3 0x00007f7bde44d870 __restore_rt (/lib64/libpthread.so.0+0xf870)
#4 0x0000000001145d9d
llvm::ConstantVector::getImpl(llvm::ArrayRef<llvm::Constant*>)
(/usr/local/bin/opt+0x1145d9d)
#5 0x0000000001148fa9
llvm::ConstantVector::get(llvm::ArrayRef<llvm::Constant*>)
(/usr/local/bin/opt+0x1148fa9)
#6 0x0000000001133b3e
llvm::ConstantFoldInsertElementInstruction(llvm::Constant*, llvm::Constant*,
llvm::Constant*) (/usr/local/bin/opt+0x1133b3e)
#7 0x000000000114cbce llvm::ConstantExpr::getInsertElement(llvm::Constant*,
llvm::Constant*, llvm::Constant*, llvm::Type*) (/usr/local/bin/opt+0x114cbce)
#8 0x0000000000e1b53d llvm::ConstantFoldInstOperands(unsigned int, llvm::Type*,
llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&,
llvm::TargetLibraryInfo const*) (/usr/local/bin/opt+0xe1b53d)
#9 0x0000000000e1e00a llvm::ConstantFoldInstruction(llvm::Instruction*,
llvm::DataLayout const&, llvm::TargetLibraryInfo const*)
(/usr/local/bin/opt+0xe1e00a)
#10 0x00000000012e7019 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&, llvm::LoopInfo*)
(/usr/local/bin/opt+0x12e7019)
#11 0x00000000012e7d29 (anonymous
namespace)::InstructionCombiningPass::runOnFunction(llvm::Function&)
(/usr/local/bin/opt+0x12e7d29)
#12 0x0000000001237b2a llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/opt+0x1237b2a)
#13 0x0000000001237e8b llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/opt+0x1237e8b)
#14 0x0000000001238180 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/opt+0x1238180)
#15 0x000000000062620c main (/usr/local/bin/opt+0x62620c)
#16 0x00007f7bdd600b05 __libc_start_main (/lib64/libc.so.6+0x21b05)
#17 0x000000000066d2d4 _start
/home/abuild/rpmbuild/BUILD/glibc-2.19/csu/../sysdeps/x86_64/start.S:125:0
Stack dump:
0. Program arguments: opt -instcombine crash.ll -o out.ll
1. Running pass 'Function Pass Manager' on module 'crash.ll'.
2. Running pass 'Combine redundant instructions' on function '@f'
Please let me know if you need any other information.</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>