[PATCH] D99591: [test, HardwareLoops] Fix use of var defined in CHECK-NOT

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 06:57:00 PDT 2021


thopre created this revision.
thopre added reviewers: samparker, dmgreen, SjoerdMeijer, efriedma, t.p.northover.
Herald added a subscriber: kristof.beyls.
thopre requested review of this revision.
Herald added a project: LLVM.

LLVM test Transforms/HardwareLoops/ARM/structure.ll tries to check for
the absence of a sequence of instructions with several CHECK-NOT with
one of those directives using a variable defined in another. However
CHECK-NOT are checked independently so that is using a variable defined
in a pattern that should not occur in the input.

This commit only checks for the absence of llvm.loop.decrement.i32 which
rules out the presence of the whole sequence and does not involve an
undefined variable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99591

Files:
  llvm/test/Transforms/HardwareLoops/ARM/structure.ll


Index: llvm/test/Transforms/HardwareLoops/ARM/structure.ll
===================================================================
--- llvm/test/Transforms/HardwareLoops/ARM/structure.ll
+++ llvm/test/Transforms/HardwareLoops/ARM/structure.ll
@@ -60,8 +60,7 @@
 ; CHECK: [[CMP:%[^ ]+]] = icmp ne i32 [[LOOP_DEC]], 0
 ; CHECK: br i1 [[CMP]], label %while.body3.us, label %while.cond1.while.end_crit_edge.us
 
-; CHECK-NOT: [[LOOP_DEC1:%[^ ]+]] = call i1 @llvm.loop.decrement.i32(i32 1)
-; CHECK-NOT: br i1 [[LOOP_DEC1]], label %while.cond1.preheader.us, label %while.end7
+; CHECK-NOT: %{{[^ ]+}} = call i1 @llvm.loop.decrement.i32(i32 1)
 
 define void @nested(i32* nocapture %A, i32 %N) {
 entry:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99591.334148.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/06399d18/attachment.bin>


More information about the llvm-commits mailing list