[llvm] r322533 - [SROA] fix assetion failure

Hiroshi 7 Inoue via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 06:05:36 PDT 2018


Mikael,

Thank you so much for the report.
I will investigate the issue.

-----
Hiroshi Inoue <inouehrs at jp.ibm.com>
IBM Research - Tokyo


"Mikael Holmén" <mikael.holmen at ericsson.com> wrote on 2018/04/27 21:35:47:

> From: "Mikael Holmén" <mikael.holmen at ericsson.com>
> To: Hiroshi Inoue <inouehrs at jp.ibm.com>
> Cc: <llvm-commits at lists.llvm.org>
> Date: 2018/04/27 21:37
> Subject: Re: [llvm] r322533 - [SROA] fix assetion failure
>
> Hi Hiroshi,
>
> I found a case where we hit an assert with this commit:
>
> opt -S -o - tr15934_sparc.ll -sroa
>
> gives
>
> opt: ../lib/Transforms/Scalar/SROA.cpp:2567: bool
> llvm::sroa::AllocaSliceRewriter::rewriteIntegerStore(llvm::Value *,
> llvm::StoreInst &, llvm::AAMDNodes): Assertion `BeginOffset >=
> NewAllocaBeginOffset && "Out of bounds offset"' failed.
> Stack dump:
> 0.      Program arguments: ../llvm-patch/build-all/bin/opt -S -o -
> tr15934_sparc.ll -sroa
> 1.      Running pass 'Function Pass Manager' on module
'tr15934_sparc.ll'.
> 2.      Running pass 'SROA' on function '@f2'
> #0 0x0000000001f3f5d4 PrintStackTraceSignalHandler(void*)
> (../llvm-patch/build-all/bin/opt+0x1f3f5d4)
> #1 0x0000000001f3fd46 SignalHandler(int)
> (../llvm-patch/build-all/bin/opt+0x1f3fd46)
> #2 0x00007fc25d381330 __restore_rt
> (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
> #3 0x00007fc25bf70c37 gsignal
> /build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/
> linux/raise.c:56:0
> #4 0x00007fc25bf74028 abort
> /build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
> #5 0x00007fc25bf69bf6 __assert_fail_base
> /build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
> #6 0x00007fc25bf69ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
> #7 0x0000000001e67547 (../llvm-patch/build-all/bin/opt+0x1e67547)
> #8 0x0000000001e669b1
> llvm::sroa::AllocaSliceRewriter::visitStoreInst(llvm::StoreInst&)
> (../llvm-patch/build-all/bin/opt+0x1e669b1)
> #9 0x0000000001e5e169 llvm::InstVisitor<llvm::sroa::AllocaSliceRewriter,
> bool>::visit(llvm::Instruction&) (../llvm-patch/build-all/bin/opt
+0x1e5e169)
> #10 0x0000000001e4f1ba llvm::sroa::AllocaSliceRewriter::visit((anonymous
> namespace)::Slice const*) (../llvm-patch/build-all/bin/opt+0x1e4f1ba)
> #11 0x0000000001e4da3f llvm::SROA::rewritePartition(llvm::AllocaInst&,
> llvm::sroa::AllocaSlices&, llvm::sroa::Partition&)
> (../llvm-patch/build-all/bin/opt+0x1e4da3f)
> #12 0x0000000001e4f991 llvm::SROA::splitAlloca(llvm::AllocaInst&,
> llvm::sroa::AllocaSlices&) (../llvm-patch/build-all/bin/opt+0x1e4f991)
> #13 0x0000000001e51588 llvm::SROA::runOnAlloca(llvm::AllocaInst&)
> (../llvm-patch/build-all/bin/opt+0x1e51588)
> #14 0x0000000001e5324b llvm::SROA::runImpl(llvm::Function&,
> llvm::DominatorTree&, llvm::AssumptionCache&)
> (../llvm-patch/build-all/bin/opt+0x1e5324b)
> #15 0x0000000001e5bb2e
> llvm::sroa::SROALegacyPass::runOnFunction(llvm::Function&)
> (../llvm-patch/build-all/bin/opt+0x1e5bb2e)
> #16 0x00000000019ea708
> llvm::FPPassManager::runOnFunction(llvm::Function&)
> (../llvm-patch/build-all/bin/opt+0x19ea708)
> #17 0x00000000019ea948 llvm::FPPassManager::runOnModule(llvm::Module&)
> (../llvm-patch/build-all/bin/opt+0x19ea948)
> #18 0x00000000019eae25 llvm::legacy::PassManagerImpl::run(llvm::Module&)
> (../llvm-patch/build-all/bin/opt+0x19eae25)
> #19 0x0000000000735055 main (../llvm-patch/build-all/bin/opt+0x735055)
> #20 0x00007fc25bf5bf45 __libc_start_main
> /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:321:0
> #21 0x000000000071eb1d _start (../llvm-patch/build-all/bin/opt+0x71eb1d)
> Abort
>
> I wrote PR37267 about it:
>   https://urldefense.proofpoint.com/v2/url?
>
u=https-3A__bugs.llvm.org_show-5Fbug.cgi-3Fid-3D37267&d=DwICaQ&c=jf_iaSHvJObTbx-

> siA1ZOg&r=m0X4DAZw5Qh-99BsgZP4_s5n1wQ8Sz4aTCPvRS-
>
YkVI&m=oRzmGwpRd_6OjcsNdKBJyVaoBQrDzEOfynNZwSRiE30&s=PI0tP_ivU0dt6o0X9kJBcGopuZEW17gxel7WOe8jyDs&e=

>
> Regards,
> Mikael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180427/3945c0d4/attachment.html>


More information about the llvm-commits mailing list