[PATCH] D109368: [LV] Don't vectorize if we can prove RT + vector cost >= scalar cost.

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 15:36:38 PDT 2021


haowei added a comment.

We are seeing these changes (ab1dbcecd6f0a to f3190dedeef9 <https://reviews.llvm.org/rGf3190dedeef9da2109ea57e4cb372f295ff53b88>) breaks multiple Polly::CodeGen tests.
E.g. Polly :: CodeGen/aliasing_different_pointer_types.ll failed with message:

  Script:
  --
  : 'RUN: at line 1';   /b/s/w/ir/x/w/staging/llvm_build/bin/opt  -polly-process-unprofitable  -polly-remarks-minimal  -polly-use-llvm-names  -polly-import-jscop-dir=/b/s/w/ir/x/w/llvm-project/polly/test/CodeGen  -polly-codegen-verify  -polly-codegen -S < /b/s/w/ir/x/w/llvm-project/polly/test/CodeGen/aliasing_different_pointer_types.ll | /b/s/w/ir/x/w/staging/llvm_build/bin/FileCheck /b/s/w/ir/x/w/llvm-project/polly/test/CodeGen/aliasing_different_pointer_types.ll
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  /b/s/w/ir/x/w/llvm-project/polly/test/CodeGen/aliasing_different_pointer_types.ll:18:10: error: CHECK: expected string not found in input
  ; CHECK: %[[orAndTrue:[._a-zA-Z0-9]]] = and i1 true, %[[le1OrLe2]]
           ^
  <stdin>:20:19: note: scanning from here
   %6 = or i1 %2, %5
                    ^
  <stdin>:20:19: note: with "le1OrLe2" equal to "6"
   %6 = or i1 %2, %5
                    ^
  <stdin>:40:2: note: possible intended match here
   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
   ^
  
  Input file: <stdin>
  Check file: /b/s/w/ir/x/w/llvm-project/polly/test/CodeGen/aliasing_different_pointer_types.ll
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<<<<<
              .
              .
              .
             15:  %polly.access.A1 = getelementptr double*, double** %A, i64 1024 
             16:  %polly.access.B2 = getelementptr float*, float** %B, i64 0 
             17:  %3 = ptrtoint double** %polly.access.A1 to i64 
             18:  %4 = ptrtoint float** %polly.access.B2 to i64 
             19:  %5 = icmp ule i64 %3, %4 
             20:  %6 = or i1 %2, %5 
  check:18'0                       X error: no match found
  check:18'1                         with "le1OrLe2" equal to "6"
             21:  br i1 %6, label %polly.start, label %for.cond.pre_entry_bb 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             22:  
  check:18'0     ~
             23: for.cond.pre_entry_bb: ; preds = %polly.split_new_and_old 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             24:  br label %for.cond 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~
             25:  
  check:18'0     ~
              .
              .
              .
             35:  %arrayidx2 = getelementptr inbounds double*, double** %A, i64 %indvars.iv 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             36:  store double* %tmp1, double** %arrayidx2, align 8 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             37:  br label %for.inc 
  check:18'0     ~~~~~~~~~~~~~~~~~~~
             38:  
  check:18'0     ~
             39: for.inc: ; preds = %for.body 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             40:  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  check:18'2      ?                                                  possible intended match
             41:  br label %for.cond 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~
             42:  
  check:18'0     ~
             43: polly.merge_new_and_old: ; preds = %polly.exiting, %for.cond 
  check:18'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             44:  br label %for.end 
  check:18'0     ~~~~~~~~~~~~~~~~~~~
             45:  
  check:18'0     ~
              .
              .
              .
  >>>>>>
  --

failed build: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8832202202604530161/overview

Could you take a look? If it takes a long time to fix, could you revert your change first?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109368



More information about the llvm-commits mailing list