[llvm-bugs] [Bug 28725] New: instcombine/const folding segfaults with attached module

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 26 17:16:10 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28725

            Bug ID: 28725
           Summary: instcombine/const folding segfaults with attached
                    module
           Product: new-bugs
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: haris at nvidia.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16814
  --> https://llvm.org/bugs/attachment.cgi?id=16814&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160727/872d329a/attachment.html>


More information about the llvm-bugs mailing list