[LLVMbugs] [Bug 22703] New: Loop vectorizer seems very reluctant to make use of PMULLD

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 25 15:22:59 PST 2015


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

            Bug ID: 22703
           Summary: Loop vectorizer seems very reluctant to make use of
                    PMULLD
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mats at planetcatfish.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13946
  --> http://llvm.org/bugs/attachment.cgi?id=13946&action=edit
Sample code

I expected the attached code to produce PMULLD on x86-64 (or x86-32) with
SSE4.1 enabled.

Command line used:
clang++ -S -O3 -msse4.1 floop.cpp

Using this:
clang++ -S -O3 -msse4.1 -Rpass-analysis=loop-vectorize floop.cpp 

Gives:
floop.cpp:8:5: remark: not beneficial to vectorize and user disabled
      interleaving [-Rpass-analysis=loop-vectorize]
    for (i=0;i<100;i++) a[i]= (float) (i*i);


Adding these:

#pragma clang loop vectorize(enable) 
#pragma clang loop interleave(enable)

it unrolls the loop and uses pmuludq, but still no pmulld.

-- 
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/20150225/05ee607c/attachment.html>


More information about the llvm-bugs mailing list