[PATCH] D99582: [test, LoopVectorize] Fix use of var defined in CHECK-NOT

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 01:10:26 PDT 2021


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/test/Transforms/LoopVectorize/pr34681.ll:27
-; CHECK-NOT: %[[TEST:[0-9]+]] = or i1 false, %ident.check
-; CHECK-NOT: br i1 %[[TEST]], label %scalar.ph, label %vector.ph
 ; CHECK: vector.ph
----------------
thopre wrote:
> fhahn wrote:
> > what's the branch condition in this test? Could we check for the right one? Same below
> We could do:
> 
> `; CHECK-NOT: %ident.check = icmp ne i32 %N, 1{{(.*[[:space:]])+}}%[[TEST:[0-9]+]] = or i1 false, %ident.check{{(.*[[:space:]])+}}br i1 %[[TEST]], label %scalar.ph, label %vector.ph`
> 
> but it's a lot less readable and thus more likely to have a bug in it. How about checking the absence of both icmp, or and br?
>  How about checking the absence of both icmp, or and br?

That sounds good, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99582



More information about the llvm-commits mailing list