Closed regehr closed 7 months ago
this is src:
; ModuleID = 'M2' source_filename = "M2" target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64-linux-gnu" define ptr @f() { ret ptr null }
and this is tgt:
; ModuleID = 'M2' source_filename = "M2" target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) define noalias ptr @f() local_unnamed_addr #0 { arm_tv_entry: ret ptr null } attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) } regehr@john-home:~/alive2-regehr/tests/arm-tv/bugs$
regehr@john-home:~/alive2-regehr/tests/arm-tv/bugs$ ~/alive2-regehr/build/alive-tv return-ptr-1.aarch64.ll bar.ll --tgt-is-asm ---------------------------------------- define ptr @f() { #0: ret ptr null } => define ptr @f() nofree noalias willreturn asm memory(none) { arm_tv_entry: ret ptr null } /usr/include/c++/11/optional:439: constexpr _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() [with _Tp = smt::expr; _Dp = std::_Optional_base<smt::expr, false, false>]: Assertion 'this->_M_is_engaged()' failed. #0 0x00007fb4af1fe8c0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/regehr/llvm-project/for-alive/lib/libLLVMSupport.so.18git+0x1fe8c0) #1 0x00007fb4af1fb8cf llvm::sys::RunSignalHandlers() (/home/regehr/llvm-project/for-alive/lib/libLLVMSupport.so.18git+0x1fb8cf) #2 0x00007fb4af1fba25 SignalHandler(int) Signals.cpp:0:0 #3 0x00007fb4ae842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #4 0x00007fb4ae8969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76 #5 0x00007fb4ae8969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10 #6 0x00007fb4ae8969fc pthread_kill ./nptl/pthread_kill.c:89:10 #7 0x00007fb4ae842476 gsignal ./signal/../sysdeps/posix/raise.c:27:6 #8 0x00007fb4ae8287f3 abort ./stdlib/abort.c:81:7 #9 0x000055f0b6d7d9a8 (/home/regehr/alive2-regehr/build/alive-tv+0x379a8) #10 0x000055f0b6e0d037 IR::Memory::searchPointer(smt::expr const&) const (/home/regehr/alive2-regehr/build/alive-tv+0xc7037) #11 0x000055f0b6e1d297 IR::Pointer::refined(IR::Pointer const&) const (/home/regehr/alive2-regehr/build/alive-tv+0xd7297) #12 0x000055f0b6e43e9e IR::PtrType::refines(IR::State&, IR::State&, IR::StateValue const&, IR::StateValue const&) const (/home/regehr/alive2-regehr/build/alive-tv+0xfde9e) #13 0x000055f0b6e7bbfd check_refinement(util::Errors&, tools::Transform const&, IR::State&, IR::State&, IR::Value const*, IR::Type const&, IR::State::ValTy const&, IR::State::ValTy const&, bool) transform.cpp:0:0 #14 0x000055f0b6e8168d tools::TransformVerify::verify() const (/home/regehr/alive2-regehr/build/alive-tv+0x13b68d) #15 0x000055f0b6d85577 (anonymous namespace)::verify(llvm::Function&, llvm::Function&, llvm::TargetLibraryInfoWrapperPass&, smt::smt_initializer&, std::ostream&, bool, bool) compare.cpp:0:0 #16 0x000055f0b6d87824 llvm_util::Verifier::compareFunctions(llvm::Function&, llvm::Function&) (/home/regehr/alive2-regehr/build/alive-tv+0x41824) #17 0x000055f0b6d7ba68 main (/home/regehr/alive2-regehr/build/alive-tv+0x35a68) #18 0x00007fb4ae829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #19 0x00007fb4ae829e40 call_init ./csu/../csu/libc-start.c:128:20 #20 0x00007fb4ae829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #21 0x000055f0b6d7cbb5 _start (/home/regehr/alive2-regehr/build/alive-tv+0x36bb5) PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/regehr/alive2-regehr/build/alive-tv return-ptr-1.aarch64.ll bar.ll --tgt-is-asm Aborted (core dumped) regehr@john-home:~/alive2-regehr/tests/arm-tv/bugs$
this is src:
and this is tgt: