[llvm-bugs] [Bug 51019] New: Issue in opt --place-safepoints flag
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 7 23:31:12 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51019
Bug ID: 51019
Summary: Issue in opt --place-safepoints flag
Product: libraries
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: kavindu175 at gmail.com
CC: llvm-bugs at lists.llvm.org
LLVM IR :
; ModuleID = 'test.c'
source_filename = "test.c"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @foo() #0 {
%1 = alloca i32, align 4
%2 = load i32, i32* %1, align 4
ret i32 %2
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @main() #0 gc "statepoint-example" {
%1 = alloca i32*, align 8
%2 = call noalias i8 addrspace(1)* @malloc(i64 5) #2
%3 = bitcast i8 addrspace(1)* %2 to i32 addrspace(1)*
%_4 = call i32 @foo()
%_3_cast = addrspacecast i32 addrspace(1)* %3 to i32*
store i32* %_3_cast, i32** %1, align 8
ret i32 0
}
; Function Attrs: nounwind
declare dso_local noalias i8 addrspace(1)* @malloc(i64) #1
I am getting the following error for the above LLVM IR. Commands are shown
below.
command : opt-11 --place-safepoints test.ll -S
error :
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: opt-11 --place-safepoints test.ll -S
1. Running pass 'Function Pass Manager' on module 'test.ll'.
2. Running pass 'Place Safepoints' on function '@main'
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f5d75a5842f]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f5d75a56790]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(+0xaa6905)[0x7f5d75a58905]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f5d74fa43c0]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm8CallInstC1EPNS_12FunctionTypeEPNS_5ValueERKNS_5TwineEPNS_11InstructionE+0x18)[0x7f5d75b4a628]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x169ece8)[0x7f5d76650ce8]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x3b9)[0x7f5d75b67579]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7f5d75b6cb23]
/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3e0)[0x7f5d75b67b90]
opt-11(main+0x26ff)[0x42d94f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f5d74a780b3]
opt-11(_start+0x2e)[0x41bcde]
Segmentation fault (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/20210708/7bb36b15/attachment.html>
More information about the llvm-bugs
mailing list