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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to