[llvm-bugs] [Bug 31900] New: Crash in LoopVectorizer/ScalarEvolution

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 8 04:12:22 PST 2017


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

            Bug ID: 31900
           Summary: Crash in LoopVectorizer/ScalarEvolution
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: karl-johan.karlsson at ericsson.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17949
  --> https://llvm.org/bugs/attachment.cgi?id=17949&action=edit
Reproducer: opt -mtriple=aarch64-apple-ios -loop-vectorize
-enable-interleaved-mem-accesses -o /dev/null loopvectorize_crash.ll

The fault was detected in a out of tree backend, but I was able to reproduce
the fault in the aarch64 architecture by adding different sized addresspace
pointers to the aarch64 datalayout (see reproducer).

$ opt -mtriple=aarch64-apple-ios -loop-vectorize
-enable-interleaved-mem-accesses -o /dev/null loopvectorize_crash.ll
opt: ../lib/Analysis/ScalarEvolution.cpp:2118: const llvm::SCEV
*llvm::ScalarEvolution::getAddExpr(SmallVectorImpl<const llvm::SCEV *> &,
SCEV::NoWrapFlags, unsigned int): Assertion
`getEffectiveSCEVType(Ops[i]->getType()) == ETy && "SCEVAddExpr operand types
don't match!"' failed.
#0 0x0000000001b09bf4 PrintStackTraceSignalHandler(void*) (opt+0x1b09bf4)
#1 0x0000000001b0a366 SignalHandler(int) (opt+0x1b0a366)
#2 0x00007f5e7223c330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f5e70e2fc37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f5e70e33028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#5 0x00007f5e70e28bf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#6 0x00007f5e70e28ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#7 0x00000000012373c9
llvm::ScalarEvolution::getAddExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
llvm::SCEV::NoWrapFlags, unsigned int) (opt+0x12373c9)
#8 0x0000000001246202 llvm::ScalarEvolution::getMinusSCEV(llvm::SCEV const*,
llvm::SCEV const*, llvm::SCEV::NoWrapFlags) (opt+0x1246202)
#9 0x0000000001c22a3b (anonymous
namespace)::LoopVectorizationLegality::canVectorize() (opt+0x1c22a3b)
#10 0x0000000001c1822b llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(opt+0x1c1822b)
#11 0x0000000001c27ef3 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&) (opt+0x1c27ef3)
#12 0x0000000001c472db (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&) (opt+0x1c472db)
#13 0x000000000165f4d8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(opt+0x165f4d8)
#14 0x000000000165f718 llvm::FPPassManager::runOnModule(llvm::Module&)
(opt+0x165f718)
#15 0x000000000165fbf5 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(opt+0x165fbf5)
#16 0x00000000006ce24d main (opt+0x6ce24d)
#17 0x00007f5e70e1af45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#18 0x00000000006bfbf9 _start (opt+0x6bfbf9)
Stack dump:
0.      Program arguments: opt -mtriple=aarch64-apple-ios -loop-vectorize
-enable-interleaved-mem-accesses -o /dev/null loopvectorize_crash.ll
1.      Running pass 'Function Pass Manager' on module
'loopvectorize_crash.ll'.
2.      Running pass 'Loop Vectorization' on function '@foo'
Aborted (core dumped)
$

-- 
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/20170208/018bbe0d/attachment-0001.html>


More information about the llvm-bugs mailing list