[llvm-bugs] [Bug 49975] New: Missing variables after instcombine pass at O3
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 15 10:55:59 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49975
Bug ID: 49975
Summary: Missing variables after instcombine pass at O3
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: cristianassaiante at outlook.com
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
Upon calling a function from an external module, the variable l_28 passed to it
is not visible from lldb. Using -opt-bisect-limit we discovered that the pass
causing the symbols disappear is "InstCombinePass".
Just like the one reported previously, the bug does not occur with lower
optimisation levels.
$ cat a.c
static short a = 4;
void b( c)
{
short l_25 = 0;
int l_28, l_35 = 2, l_36 = 9, l_37 = 5, l_38 = 5, l_69 = (l_28 = a ) ==
0 & c ;
test_nop();
test_support_3329(l_25, l_28, l_35, l_36, l_37, l_38, l_69);
}
int main ()
{
b( a)
;
a = 0;
}
$ cat lib/test.c
#include <stdio.h>
#include <stdint.h>
#include "test.h"
void test_nop() {
printf("\n");
}
void test_support_3329(int l_25, int l_28, int l_35, int l_36, int l_37, int
l_38, int l_69) {
printf("%d %d %d %d %d %d %d", l_25, l_28, l_35, l_36, l_37, l_38, l_69);
}
$ cat lib/test.h
#pragma once
void test_nop();
void test_support_3329(int l_25, int l_28, int l_35, int l_36, int l_37, int
l_38, int l_69);
$ clang -v
clang version 13.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
$ lldb -v
lldb version 13.0.0
clang revision c2c977ce50597b0e5186afc342c5784bd0aa6973
lldb revision c2c977ce50597b0e5186afc342c5784bd0aa6973
$ clang -g -O3 -o opt lib/test.c a.c
$ lldb opt
(lldb) target create "opt"
Current executable set to
'/home/stepping/debuginfo-analysis/bug_submission/opt' (x86_64).
(lldb) b 7
Breakpoint 1: 2 locations.
(lldb) r
Process 26 launched: '/home/stepping/debuginfo-analysis/bug_submission/opt'
(x86_64)
Process 26 stopped
* thread #1, name = 'opt', stop reason = breakpoint 1.2
frame #0: 0x00000000004005c9 opt`main [inlined] b at a.c:7:1
4 short l_25 = 0;
5 int l_28, l_35 = 2, l_36 = 9, l_37 = 5, l_38 = 5, l_69 = (l_28 =
a ) == 0 & c ;
6 test_nop();
-> 7 test_support_3329(l_25, l_28, l_35, l_36, l_37, l_38, l_69);
8 }
9 int main ()
10 {
(lldb) frame var
(int) l_69 = 0
(int) l_38 = 5
(int) l_37 = 5
(int) l_36 = 9
(int) l_35 = 2
(short) l_25 = 0
(lldb) frame var l_28
error: no variable named 'l_28' found in this frame
--
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/20210415/b122b9ec/attachment.html>
More information about the llvm-bugs
mailing list