[LLVMbugs] [Bug 865] NEW: Coallescer is really confused or something
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Aug 2 23:23:20 PDT 2006
http://llvm.org/bugs/show_bug.cgi?id=865
Summary: Coallescer is really confused or something
Product: libraries
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
CC: natebegeman at mac.com
llc -fast -march=x86 on this .ll file:
int %foo(int* %a, int %t, int %C) {
entry:
%a = cast int* %a to uint ; <uint> [#uses=1]
br label %cond_true
cond_true: ; preds = %cond_true, %entry
%iv. = phi uint [ %a, %entry ], [ %iv..inc, %cond_true ] ; <uint> [#uses=2]
%t_addr.0.0 = phi int [ %t, %entry ], [ %tmp7, %cond_true ] ; <int> [#uses=2]
%iv. = cast uint %iv. to int* ; <int*> [#uses=1]
%tmp3 = load int* %iv. ; <int> [#uses=1]
%tmp7 = add int %t_addr.0.0, %tmp3 ; <int> [#uses=1]
%tmp = setgt int %C, 39 ; <bool> [#uses=1]
%iv..inc = add uint %iv., 4 ; <uint> [#uses=1]
br bool %tmp, label %bb12, label %cond_true
bb12: ; preds = %cond_true
ret int %t_addr.0.0
}
produces:
_foo:
subl $4, %esp
movl %esi, (%esp)
movl 8(%esp), %ecx
movl 16(%esp), %edx
movl 12(%esp), %esi
LBB1_1: #cond_true
*** movl %esi, %eax
*** movl %eax, %esi
addl (%ecx), %esi
addl $4, %ecx
cmpl $40, %edx
jl LBB1_1 #cond_true
LBB1_2: #bb12
movl (%esp), %esi
addl $4, %esp
ret
It is safe to say that that is not the fastest way to copy esi into esi. Note that eax is dead.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list