[LLVMbugs] [Bug 11064] New: Duplicate store instructions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 4 21:47:02 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11064
Summary: Duplicate store instructions
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: hfinkel at anl.gov
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7403)
--> (http://llvm.org/bugs/attachment.cgi?id=7403)
The LLVM file.
The current trunk version of LLVM generates duplicate store instructions for
the attached LLVM code. This code was generated by clang for the following
function:
double _Complex maybe_an_fma(double _Complex a, double _Complex b, double
_Complex c)
{
return a*b + c;
}
Running Debug+Asserts/bin/llc -O3 -o - t.ll yields an assembly sequence which
ends with:
addsd 40(%esp), %xmm0
movl 4(%esp), %eax
movsd %xmm0, (%eax)
movsd %xmm1, 8(%eax)
movsd %xmm1, 8(%eax)
ret $4
Running Debug+Asserts/bin/llc -O3 -mtriple=powerpc-unknown-linux-gnu -o - t.ll
yields an assembly sequence which ends with:
fadd 0, 0, 4
stfd 1, 0(3)
stfd 0, 8(3)
stfd 0, 8(3)
blr
In both cases, the final store instructions are identical. The LLVM ends with:
%real1 = getelementptr inbounds %0* %agg.result, i32 0, i32 0
%imag2 = getelementptr inbounds %0* %agg.result, i32 0, i32 1
store double %agg.result.real, double* %real1
store double %agg.result.imag, double* %imag2
ret void
(full LLVM file attached). Something seems amiss.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list