[llvm-bugs] [Bug 37527] New: MergeICmps crashes when compiling with -fno-builtin

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 18 17:25:48 PDT 2018


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

            Bug ID: 37527
           Summary: MergeICmps crashes when compiling with -fno-builtin
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvm-bugs at lists.llvm.org

Created attachment 20321
  --> https://bugs.llvm.org/attachment.cgi?id=20321&action=edit
testcase

Testcase attached. Build with:

$ clang -cc1 -O3 -fno-builtin -x ir merge-icmp.ir -emit-obj -o /dev/null

to reproduce the crash:

Stack dump:
0.      Program arguments: clang -cc1 -O3 -fno-builtin -x ir /tmp/merge-icmp.ir
-emit-obj -o /dev/null 
1.      Code generation
2.      Running pass 'Function Pass Manager' on module '/tmp/merge-icmp.ir'.
3.      Running pass 'Merge contiguous icmps into a memcmp' on function
'@wobble'
#0 0x0000556256dd66a6 llvm::sys::RunSignalHandlers() (clang+0x1d4f6a6)
#1 0x00005562560552f4 SignalHandler(int) (clang+0xfce2f4)
#2 0x00007f29694cf9a0 __restore_rt (/usr/grte/v4/lib64/libpthread.so.0+0xf9a0)
#3 0x0000556256f01180 llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>::CreateICmp(llvm::CmpInst::Predicate,
llvm::Value*, llvm::Value*, llvm::Twine const&) (clang+0x1e7a180)
#4 0x000055625628fd05 (anonymous
namespace)::BCECmpChain::mergeComparisons(llvm::ArrayRef<(anonymous
namespace)::BCECmpBlock>, llvm::BasicBlock*, llvm::PHINode&,
llvm::TargetLibraryInfo const*) (clang+0x1208d05)
#5 0x0000556256269972 (anonymous
namespace)::MergeICmps::runOnFunction(llvm::Function&) (clang+0x11e2972)

-- 
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/20180519/675bd7ce/attachment.html>


More information about the llvm-bugs mailing list