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

Sanjay Patel <spatel+l...@rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Sanjay Patel <spatel+l...@rotateright.com> ---
The attached program is no longer a valid test. LLVM pre-computes the whole
thing - no multiplies needed!

If we modify main to take 'argc' and the loop to be:
    for (i=0;i<argc;i++) a[i]= (float) (i*i);

...then we can see with r318307:

$ ./clang++ -w -S -O2 -msse4.1 floop.cpp -o -  -emit-llvm | grep mul
  %5 = mul nsw <4 x i32> %vec.ind25, %vec.ind25
  %6 = mul nsw <4 x i32> %step.add26, %step.add26
  %13 = mul nsw <4 x i32> %vec.ind.next28, %vec.ind.next28
  %14 = mul nsw <4 x i32> %step.add26.1, %step.add26.1
  %21 = mul nsw <4 x i32> %vec.ind25.unr, %vec.ind25.unr
  %22 = mul nsw <4 x i32> %step.add26.epil, %step.add26.epil


and:
$ ./clang++ -w -S -O2 -msse4.1 floop.cpp -o -   |grep mul
        pmulld  %xmm6, %xmm6
        pmulld  %xmm5, %xmm5
        pmulld  %xmm5, %xmm5
        pmulld  %xmm6, %xmm6
        pmulld  %xmm0, %xmm0
        pmulld  %xmm1, %xmm1

So I'm going to close this as fixed. If there are other cases where we still do
not produce the right vector multiply, please do open a new bug report.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to