[llvm] r251291 - Loop Vectorizer - skipping "bitcast" before GEP

Demikhovsky, Elena via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 1 00:06:27 PDT 2015


Hi Eric,

Do you have more questions? The revision is accepted and I’d like to commit it.
Thanks.

-           Elena

From: Demikhovsky, Elena
Sent: Wednesday, October 28, 2015 09:50
To: Eric Christopher <echristo at gmail.com>
Cc: llvm-commits at lists.llvm.org; Hal Finkel (hfinkel at anl.gov) <hfinkel at anl.gov>
Subject: RE: [llvm] r251291 - Loop Vectorizer - skipping "bitcast" before GEP

This test checks remark messages. It expects to see “the cost-model indicates that vectorization is not beneficial”.
But after skipping  ‘bitcast’ the vectorization becomes beneficial and the expected message is not generated any more.

This is the original code that wasn’t vectorized due to the ‘bitcast’:

  %arrayidx = getelementptr inbounds float, float* %in, i64 %indvars.iv, !dbg !9
  %0 = bitcast float* %arrayidx to i32*, !dbg !9
  %1 = load i32, i32* %0, align 4, !dbg !9, !tbaa !11

I just took another loop in order to get the expected remark.


-           Elena

From: Eric Christopher [mailto:echristo at gmail.com]
Sent: Wednesday, October 28, 2015 03:25
To: Demikhovsky, Elena; llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
Subject: Re: [llvm] r251291 - Loop Vectorizer - skipping "bitcast" before GEP


 ; First loop.
 ;  #pragma clang loop interleave(disable) unroll(disable)
 ;  for(int i = 0; i < n; i++) {
-;    out[i] = in[i];
+;    out[i] = *in[i];
 ;  }

 ; Second loop.
 ;  #pragma clang loop unroll(disable)
 ;  for(int i = 0; i < n; i++) {
-;    out[i] = in[i];
+;    out[i] = *in[i];
 ;  }

As a start in looking at this (since it was reverted, but before you apply again), why did you regenerate the testcase with different beginning code? It doesn't make sense.

-eric
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151101/71c09612/attachment.html>


More information about the llvm-commits mailing list