[llvm-bugs] [Bug 42138] New: Different codegen with/without -g
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 5 06:16:54 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42138
Bug ID: 42138
Summary: Different codegen with/without -g
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: chris.dawson at sony.com
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
Using the check-cfc tool (
https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc ) to
spot a codegen difference depending on whether -g is specified or not.
$ cat PowerParser.ii.cc
template <typename, typename = int> class e;
class allocator {
public:
~allocator();
};
template <typename, typename> class e {
public:
e(char *, allocator = allocator());
};
template <typename b, typename c, typename d> bool operator==(e<c, d>, b);
class f {
public:
f(int *, int *, int *, int, int, int, int);
e<char> g();
void j();
};
int h, i;
class k {
void l();
bool m_fn4();
int m;
int n;
int q;
int fmap;
};
void k::l() {
e<char> o = "";
for (;;) {
int p = 0;
for (;;) {
if (m_fn4())
break;
f a(&q, &fmap, &m, n, h, i, 0);
if (a.g() == "")
a.j();
}
}
}
$ ./llvm-project/clang/utils/check_cfc/clang++ PowerParser.ii.cc -w -c -O1 -o
tmp.ll
Check CFC, checking: dash_g_no_change
PowerParser.ii.cc Code difference detected with -g
--- /tmp/tmpcdg_LH.o
+++ /tmp/tmpfkaPkW.o
@@ -19,6 +19,6 @@
28: 4c 8d 73 08 lea 0x8(%rbx),%r14
2c: 4c 8d 7b 0c lea 0xc(%rbx),%r15
30: 4c 8d 64 24 08 lea 0x8(%rsp),%r12
- 35: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
- 3c: 00 00 00
- 3f: 90 nop
+ 35: eb 09 jmp 40 <_ZN1k1lEv+0x40>
+ 37: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
+ 3e: 00 00
*** Diff truncated ***
--
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/20190605/48d466b9/attachment.html>
More information about the llvm-bugs
mailing list