[LLVMbugs] [Bug 2642] New: Constant floating-point vector multiplies don't fold

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Aug 5 14:09:43 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2642

           Summary: Constant floating-point vector multiplies don't fold
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicolas at capens.net
                CC: llvmbugs at cs.uiuc.edu


The following LLVM IR generates x86 code with two separate vector multiplies
instead of one:

external global <4 x float>, align 16           ; <<4 x float>*>:0 [#uses=1]
external global <4 x float>, align 16           ; <<4 x float>*>:1 [#uses=1]

define internal void @""() {
        load <4 x float>* @0, align 16          ; <<4 x float>>:1 [#uses=1]
        mul <4 x float> %1, < float 2.000000e+000, float 2.000000e+000, float
2.000000e+000, float 2.000000e+000 >              ; <<4 x float>>:2 [#uses=1]
        mul <4 x float> %2, < float 3.000000e+000, float 3.000000e+000, float
3.000000e+000, float 3.000000e+000 >              ; <<4 x float>>:3 [#uses=1]
        store <4 x float> %3, <4 x float>* @1, align 16
        ret void
}

Replacing the vectors with scalars does result in a single multiply by 6.0.


-- 
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