Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

opt -loop-unroll -iv-users crashes when doing "Freeing Pass 'Induction Variable Users' on Loop '<deleted>'..." #43196

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR44226
Status NEW
Importance P enhancement
Reported by Mikael Holmén (mikael.holmen@ericsson.com)
Reported on 2019-12-05 00:55:16 -0800
Last modified on 2021-01-06 18:14:08 -0800
Version unspecified
Hardware PC Linux
CC htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, yuanfang.chen@sony.com
Fixed by commit(s)
Attachments bbi-36444.ll (255 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 22895
bbi-36444.ll reproducer

llvm version: f3dafd21a36f

Reproduce with:
 opt -o /dev/null bbi-36444.ll -loop-unroll -iv-users

Result:
Stack dump:
0.      Program arguments: build-all-builtins/bin/opt -o /dev/null bbi-36444.ll
-loop-unroll -iv-users
1.      Running pass 'Function Pass Manager' on module 'bbi-36444.ll'.
2.      Running pass 'Loop Pass Manager' on function '@test'
3.      Releasing pass 'Induction Variable Users'
 #0 0x0000000003e69574 PrintStackTraceSignalHandler(void*) (build-all-builtins/bin/opt+0x3e69574)
 #1 0x0000000003e6725e llvm::sys::RunSignalHandlers() (build-all-builtins/bin/opt+0x3e6725e)
 #2 0x0000000003e6997c SignalHandler(int) (build-all-builtins/bin/opt+0x3e6997c)
 #3 0x00007efe32333890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x000000000303e185 llvm::IVUsersWrapperPass::releaseMemory() (build-all-builtins/bin/opt+0x303e185)
 #5 0x0000000003709b4f llvm::PMDataManager::freePass(llvm::Pass*, llvm::StringRef, llvm::PassDebuggingString) (build-all-builtins/bin/opt+0x3709b4f)
 #6 0x00000000030be57d llvm::LPPassManager::runOnFunction(llvm::Function&) (build-all-builtins/bin/opt+0x30be57d)
 #7 0x000000000370c683 llvm::FPPassManager::runOnFunction(llvm::Function&) (build-all-builtins/bin/opt+0x370c683)
 #8 0x000000000370c968 llvm::FPPassManager::runOnModule(llvm::Module&) (build-all-builtins/bin/opt+0x370c968)
 #9 0x000000000370cfcd llvm::legacy::PassManagerImpl::run(llvm::Module&) (build-all-builtins/bin/opt+0x370cfcd)
#10 0x000000000207cdaa main (build-all-builtins/bin/opt+0x207cdaa)
#11 0x00007efe30dbfb97 __libc_start_main /build/glibc-OTsEL5/glibc-
2.27/csu/../csu/libc-start.c:344:0
#12 0x000000000206502a _start (build-all-builtins/bin/opt+0x206502a)
Segmentation fault (core dumped)

-debug-pass=Executions gives

[2019-12-05 09:54:16.848083739] 0x51f7480   Executing Pass 'Function Pass
Manager' on Module 'bbi-36444.ll'...
[2019-12-05 09:54:16.848188364] 0x51fc2e0     Executing Pass 'Dominator Tree
Construction' on Function 'test'...
[2019-12-05 09:54:16.848226289] 0x51fc2e0     Executing Pass 'Natural Loop
Information' on Function 'test'...
[2019-12-05 09:54:16.848261630] 0x51fc2e0     Executing Pass 'Canonicalize
natural loops' on Function 'test'...
[2019-12-05 09:54:16.848300952] 0x51fc2e0     Made Modification 'Canonicalize
natural loops' on Function 'test'...
[2019-12-05 09:54:16.848325816] 0x51fc2e0     Executing Pass 'LCSSA Verifier'
on Function 'test'...
[2019-12-05 09:54:16.848348655] 0x51fc2e0     Executing Pass 'Loop-Closed SSA
Form Pass' on Function 'test'...
[2019-12-05 09:54:16.848382808] 0x51fc2e0     Executing Pass 'Basic Alias
Analysis (stateless AA impl)' on Function 'test'...
[2019-12-05 09:54:16.848411025] 0x51fc2e0     Executing Pass 'Function Alias
Analysis Results' on Function 'test'...
[2019-12-05 09:54:16.848436098] 0x51fc2e0     Executing Pass 'Scalar Evolution
Analysis' on Function 'test'...
[2019-12-05 09:54:16.848475001] 0x51fc2e0     Executing Pass 'Loop Pass
Manager' on Function 'test'...
[2019-12-05 09:54:16.848507828] 0x51fd370       Executing Pass 'Unroll loops'
on Loop 'do.body'...
[2019-12-05 09:54:16.848693960] 0x51fd370       Made Modification 'Unroll
loops' on Loop '<deleted loop>'...
[2019-12-05 09:54:16.848724062] 0x51fd370        Freeing Pass 'Unroll loops' on
Loop '<deleted>'...
[2019-12-05 09:54:16.848745015] 0x51fd370        Freeing Pass 'Unroll loops' on
Loop '<deleted>'...
[2019-12-05 09:54:16.848763733] 0x51fd370        Freeing Pass 'Induction
Variable Users' on Loop '<deleted>'...

Old passmanager problem perhaps?
Quuxplusone commented 4 years ago

Attached bbi-36444.ll (255 bytes, text/plain): bbi-36444.ll reproducer