[PATCH] D20474: when calculating RegUsages, ignore instructions which are uniformed after vectorization

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 10:57:15 PDT 2016


wmi added inline comments.

================
Comment at: test/Transforms/LoopVectorize/reverse_iter.ll:38-41
@@ -27,6 +37,6 @@
 ; <label>:3                                       ; preds = %.lr.ph, %3
   %indvars.iv = phi i64 [ %2, %.lr.ph ], [ %indvars.iv.next, %3 ]
   %sum.01 = phi i32 [ undef, %.lr.ph ], [ %9, %3 ]
   %4 = trunc i64 %indvars.iv to i32
   %5 = shl nsw i32 %4, 1
   %6 = sext i32 %5 to i64
----------------
mssimpso wrote:
> Hi Wei,
> 
> The change to this test doesn't look right to me. Since indvars.iv feeds into the shl, why is it added to VecValuesToIngore? The shift remains as vector computation. Am I missing something?
Thanks for catching the problem. My assumption that the chain feeding into "non-gather/scatter && non-consecutive" getelementptr will only have scalar version is wrong. Will update the patch.  


Repository:
  rL LLVM

http://reviews.llvm.org/D20474





More information about the llvm-commits mailing list