https://bugs.llvm.org/show_bug.cgi?id=50011
Bug ID: 50011
Summary: Inline "noinline" function if becomes empty
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
static void *ptr1, *ptr2;
static void doit(void **pptr, int cond)
{
if (cond) {
*pptr = &ptr2;
}
}
__attribute__ ((noinline))
static void f(int cond)
{
doit (&ptr1, cond);
}
int main()
{
f (1);
}
llvm -O3:
main: # @main
push rax
call f
xor eax, eax
pop rcx
ret
f: # @f
ret
https://godbolt.org/z/7387cer5j
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs