[PATCH] D154314: [LV] Remove the reminder loop if we know the mask is always true

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 00:59:26 PDT 2023


Allen added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/X86/constant-fold.ll:30
 ; CHECK:       middle.block:
-; CHECK-NEXT:    [[CMP_N:%.*]] = icmp eq i32 2, 2
-; CHECK-NEXT:    br i1 [[CMP_N]], label [[BB3:%.*]], label [[SCALAR_PH]]
----------------
david-arm wrote:
> For all the fixed-lenth vector tests this icmp will get replaced with "i1 true" by InstCombine so the scalar tail should get automatically deleted.
Yes, the remainder loop body will be deleted as the trip count is multiple of VF, so it will not be executed.


================
Comment at: llvm/test/Transforms/LoopVectorize/dont-fold-tail-for-divisible-TC.ll:4
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
----------------
david-arm wrote:
> Hmm, I know this is not introduced by your patch, but I don't think we should have tests with target-specifics in the top level LoopVectorize directory.
Thanks.
Do you have any plans to reposition them? Or where do you want me to put them that would look more appropriate?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154314/new/

https://reviews.llvm.org/D154314



More information about the llvm-commits mailing list