[llvm-bugs] [Bug 30682] New: Bogus .loc directive with -mavx
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 12 16:47:49 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30682
Bug ID: 30682
Summary: Bogus .loc directive with -mavx
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17431
--> https://llvm.org/bugs/attachment.cgi?id=17431&action=edit
test case
Compiling the attached test case for X64 Linux as
clang -c -g -S bz159663-min.cpp -mno-avx -o okay.s
and
clang -c -g -S bz159663-min.cpp -mavx -o bad.s
and diffing the results, we see the obvious instruction differences
but also 'bad.s' has some weird stuff going on with the .loc directives.
Here's an extract from a diff, showing the assembler text generated
for source line 11 (the call to method setY):
***************
.loc 1 11 33 is_stmt 1 # bz159663-min.cpp:11:33
movl -12(%rbp), %ecx
.loc 1 11 45 is_stmt 0 # bz159663-min.cpp:11:45
movb %ch, %dl # NOREX
movzbl %dl, %ecx # NOREX
.loc 1 11 32 # bz159663-min.cpp:11:32
! cvtsi2ssl %ecx, %xmm0
! .loc 1 11 8 # bz159663-min.cpp:11:8
movq -24(%rbp), %rdi # 8-byte Reload
callq _ZN7Vector44setYEf
---------------
.loc 1 11 33 is_stmt 1 # bz159663-min.cpp:11:33
movl -12(%rbp), %ecx
.loc 1 11 45 is_stmt 0 # bz159663-min.cpp:11:45
movb %ch, %dl # NOREX
movzbl %dl, %ecx # NOREX
+ .loc 1 10 32 is_stmt 1 # bz159663-min.cpp:10:32
+ # implicit-def: %XMM0
.loc 1 11 32 # bz159663-min.cpp:11:32
! vcvtsi2ssl %ecx, %xmm0, %xmm0
! .loc 1 11 8 is_stmt 0 # bz159663-min.cpp:11:8
movq -24(%rbp), %rdi # 8-byte Reload
callq _ZN7Vector44setYEf
***************
What is it about AVX that introduces the spurious directive?
--
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/20161012/8e85364d/attachment.html>
More information about the llvm-bugs
mailing list