llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Attributor] liveness.ll asserts when converted to opaque pointers

Open nikic opened this issue 2 years ago • 0 comments

Converted test: https://gist.github.com/nikic/19ba0d547f970cb3ece03be26b5f283e

Asserts with the following trace:

opt: /home/npopov/repos/llvm-project/llvm/lib/IR/Value.cpp:922: llvm::Align llvm::Value::getPointerAlignment(const llvm::DataLayout&) const: Assertion `getType()->isPointerTy() && "must be pointer"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/npopov/repos/llvm-project/build/bin/opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S
 #0 0x00000000068e871b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/npopov/repos/llvm-project/build/bin/opt+0x68e871b)
 #1 0x00000000068e60ab llvm::sys::RunSignalHandlers() (/home/npopov/repos/llvm-project/build/bin/opt+0x68e60ab)
 #2 0x00000000068e61d5 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007faf35d7fb20 __restore_rt (/lib64/libc.so.6+0x3cb20)
 #4 0x00007faf35dcfe5c __pthread_kill_implementation /usr/src/debug/glibc-2.36-9.fc37.x86_64/nptl/pthread_kill.c:44:76
 #5 0x00007faf35d7fa76 gsignal /usr/src/debug/glibc-2.36-9.fc37.x86_64/signal/../sysdeps/posix/raise.c:27:6
 #6 0x00007faf35d697fc abort /usr/src/debug/glibc-2.36-9.fc37.x86_64/stdlib/abort.c:81:7
 #7 0x00007faf35d6971b _nl_load_domain.cold /usr/src/debug/glibc-2.36-9.fc37.x86_64/intl/loadmsgcat.c:1177:9
 #8 0x00007faf35d78656 (/lib64/libc.so.6+0x35656)
 #9 0x0000000006228ba0 llvm::Value::getPointerAlignment(llvm::DataLayout const&) const (/home/npopov/repos/llvm-project/build/bin/opt+0x6228ba0)
#10 0x0000000006322b45 (anonymous namespace)::AAAlignImpl::initialize(llvm::Attributor&) AttributorAttributes.cpp:0:0
#11 0x0000000006321153 llvm::AAAlign const* llvm::Attributor::getOrCreateAAFor<llvm::AAAlign>(llvm::IRPosition, llvm::AbstractAttribute const*, llvm::DepClassTy, bool, bool) AttributorAttributes.cpp:0:0
#12 0x0000000006322359 (anonymous namespace)::AAAlignCallSiteArgument::updateImpl(llvm::Attributor&) AttributorAttributes.cpp:0:0
#13 0x0000000006287926 llvm::AbstractAttribute::update(llvm::Attributor&) (/home/npopov/repos/llvm-project/build/bin/opt+0x6287926)
#14 0x000000000629a45b llvm::Attributor::updateAA(llvm::AbstractAttribute&) (/home/npopov/repos/llvm-project/build/bin/opt+0x629a45b)
#15 0x000000000629f639 llvm::Attributor::runTillFixpoint() (/home/npopov/repos/llvm-project/build/bin/opt+0x629f639)
#16 0x00000000062b4236 llvm::Attributor::run() (/home/npopov/repos/llvm-project/build/bin/opt+0x62b4236)

nikic avatar Jun 27 '23 13:06 nikic