[PATCH] D66108: [LV] fold-tail flag

Dorit Nuzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 02:14:03 PDT 2019


dorit marked 2 inline comments as done.
dorit added a comment.

Thanks for taking a look! Please see responses below.



================
Comment at: test/Transforms/LoopVectorize/X86/tail_loop_folding.ll:2
 ; RUN: opt < %s -loop-vectorize -S | FileCheck %s
+; RUN: opt < %s -loop-vectorize -prefer-predicate-over-epilog -S | FileCheck -check-prefix=PREDFLAG %s
 
----------------
SjoerdMeijer wrote:
> Because these test cases have the `vectorize.predicate.enable` metadata set, I am not sure we are actually testing this new option. I don't think so, I think we need a separate function without the predicate metadata.
> "Because these test cases have the vectorize.predicate.enable metadata set"

not really, the second function has the vectorize.predicate.enable metadata *disabled*. This is why in the second function *without* the new flag the check for no masked loads/stores passes (see CHECK part), and *with* the new flag the check expects to find masked loads/stores (see PREDFLAG part).


================
Comment at: test/Transforms/LoopVectorize/X86/tail_loop_folding.ll:17
 ; CHECK:  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !0
-
+; PREDFLAG-LABEL: tail_folding_enabled(
+; PREDFLAG:  vector.body:
----------------
SjoerdMeijer wrote:
> I expect the output to be the same whether a pragma was used or this new options, so can we just use the CHECK tag?
I'm not sure I understand what you are suggesting...  I'm trying to distinguish between two runs - one without the flag, and one with the flag. In the first function the output is indeed the same for both runs; but this is not the case in the second function: if I'll have the second run (with the flag) check all the CHECK tags I will fail in the second function where the output differs.



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

https://reviews.llvm.org/D66108





More information about the llvm-commits mailing list