[LLVMbugs] [Bug 20881] New: Redundant instruction injected after the rdtsc instruction
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 8 14:39:17 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20881
Bug ID: 20881
Summary: Redundant instruction injected after the rdtsc
instruction
Product: clang
Version: trunk
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: yuri at tsoft.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
In the attached case redundant instruction "movl %eax, %eax" is generated
that isn't needed.
I think this is maybe because of the preceding assembly.
$ sh run-rdts.sh
.text
.file "rdtsc.c"
.globl do_rdtsc
.align 16, 0x90
.type do_rdtsc, at function
do_rdtsc: # @do_rdtsc
.cfi_startproc
# BB#0:
pushq %rbp
.Ltmp0:
.cfi_def_cfa_offset 16
.Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp2:
.cfi_def_cfa_register %rbp
#APP
rdtsc
#NO_APP
# kill: EDX<def> EDX<kill> RDX<def>
shlq $32, %rdx
movl %eax, %eax
orq %rdx, %rax
popq %rbp
retq
.Ltmp3:
.size do_rdtsc, .Ltmp3-do_rdtsc
.cfi_endproc
.ident "clang version 3.6.0 (trunk 215999)"
.section ".note.GNU-stack","", at progbits
--
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/20140908/4bedf7f0/attachment.html>
More information about the llvm-bugs
mailing list