[PATCH] D94330: [NFC] Disallow unused prefixes in CodeGen/X86 tests.

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 12:24:49 PST 2021


mtrofin created this revision.
mtrofin added reviewers: craig.topper, RKSimon.
Herald added a subscriber: pengfei.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Also fixed remaining tests that featured unused prefixes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94330

Files:
  llvm/test/CodeGen/X86/fptosi-sat-scalar.ll
  llvm/test/CodeGen/X86/fptoui-sat-scalar.ll
  llvm/test/CodeGen/X86/lit.local.cfg
  llvm/test/CodeGen/X86/vector-pack-128.ll


Index: llvm/test/CodeGen/X86/vector-pack-128.ll
===================================================================
--- llvm/test/CodeGen/X86/vector-pack-128.ll
+++ llvm/test/CodeGen/X86/vector-pack-128.ll
@@ -3,8 +3,8 @@
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE4
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx    | FileCheck %s --check-prefixes=AVX,AVX1
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2   | FileCheck %s --check-prefixes=AVX,AVX2
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+avx512f  | FileCheck %s --check-prefixes=AVX,AVX512,AVX512F
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+avx512bw | FileCheck %s --check-prefixes=AVX,AVX512,AVX512BW
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+avx512f  | FileCheck %s --check-prefixes=AVX,AVX512
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+avx512bw | FileCheck %s --check-prefixes=AVX,AVX512
 
 ; trunc(concat(x,y)) -> pack
 
Index: llvm/test/CodeGen/X86/lit.local.cfg
===================================================================
--- llvm/test/CodeGen/X86/lit.local.cfg
+++ llvm/test/CodeGen/X86/lit.local.cfg
@@ -1,2 +1,10 @@
+from lit.llvm.subst import ToolSubst
+
 if not 'X86' in config.root.targets:
     config.unsupported = True
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+    'FileCheck --allow-unused-prefixes=false'))
Index: llvm/test/CodeGen/X86/fptoui-sat-scalar.ll
===================================================================
--- llvm/test/CodeGen/X86/fptoui-sat-scalar.ll
+++ llvm/test/CodeGen/X86/fptoui-sat-scalar.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefixes=X86,X86-X87
-; RUN: llc < %s -mtriple=i686-linux -mattr=+sse2 | FileCheck %s --check-prefixes=X86,X86-SSE
+; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefix=X86-X87
+; RUN: llc < %s -mtriple=i686-linux -mattr=+sse2 | FileCheck %s --check-prefix=X86-SSE
 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=X64
 
 ;
Index: llvm/test/CodeGen/X86/fptosi-sat-scalar.ll
===================================================================
--- llvm/test/CodeGen/X86/fptosi-sat-scalar.ll
+++ llvm/test/CodeGen/X86/fptosi-sat-scalar.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefixes=X86,X86-X87
-; RUN: llc < %s -mtriple=i686-linux -mattr=+sse2 | FileCheck %s --check-prefixes=X86,X86-SSE
+; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefix=X86-X87
+; RUN: llc < %s -mtriple=i686-linux -mattr=+sse2 | FileCheck %s --check-prefix=X86-SSE
 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=X64
 
 ;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94330.315485.patch
Type: text/x-patch
Size: 3127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210108/9b52d9ee/attachment.bin>


More information about the llvm-commits mailing list