[PATCH] D99880: [PowerPC, test] Fix use of undef FileCheck var

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 5 03:31:19 PDT 2021


thopre created this revision.
thopre added reviewers: NeHuang, nemanjai, hfinkel, lei, stefanp.
Herald added subscribers: steven.zhang, shchenz, kbarton.
thopre requested review of this revision.
Herald added a project: LLVM.

LLVM test CodeGen/PowerPC/ppc-disable-non-volatile-cr.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 changes occurence of the variable for the regex used in its
definition, thereby making each CHECK-NOT independent.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99880

Files:
  llvm/test/CodeGen/PowerPC/ppc-disable-non-volatile-cr.ll


Index: llvm/test/CodeGen/PowerPC/ppc-disable-non-volatile-cr.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/ppc-disable-non-volatile-cr.ll
+++ llvm/test/CodeGen/PowerPC/ppc-disable-non-volatile-cr.ll
@@ -8,8 +8,8 @@
 define dso_local signext i32 @DisableNonVolatileCR(i32 signext %a, i32 signext %b) {
 ; CHECK-DISABLE-LABEL: DisableNonVolatileCR:
 ; CHECK-DISABLE:       # %bb.0: # %entry
-; CHECK-DISABLE-NOT:    mfocrf [[REG1:r[0-9]+]]
-; CHECK-DISABLE-NOT:    stw [[REG1]]
+; CHECK-DISABLE-NOT:    mfocrf {{r[0-9]+}}
+; CHECK-DISABLE-NOT:    stw {{r[0-9]+}}
 ; CHECK-DISABLE:        stdu r1
 ; CHECK-DISABLE-DAG:    mfocrf [[REG2:r[0-9]+]]
 ; CHECK-DISABLE-DAG:    stw [[REG2]]
@@ -20,8 +20,8 @@
 ; CHECK-ENABLE-DAG:    mfocrf [[REG1:r[0-9]+]]
 ; CHECK-ENABLE-DAG:    stw [[REG1]]
 ; CHECK-ENABLE:        stdu r1
-; CHECK-ENABLE-NOT:    mfocrf [[REG2:r[0-9]+]]
-; CHECK-ENABLE-NOT:    stw [[REG2]]
+; CHECK-ENABLE-NOT:    mfocrf {{r[0-9]+}}
+; CHECK-ENABLE-NOT:    stw {{r[0-9]+}}
 ; CHECK-ENABLE:        # %bb.1: # %if.then
 
 entry:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99880.335234.patch
Type: text/x-patch
Size: 1093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210405/4bf5cb13/attachment.bin>


More information about the llvm-commits mailing list