Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoongArch][clang] Modify loongarch-msimd.c to avoid grep -o. NFC #98442

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

ylzsx
Copy link
Contributor

@ylzsx ylzsx commented Jul 11, 2024

https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jul 11, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 11, 2024

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Zhaoxin Yang (ylzsx)

Changes
https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c

Full diff: https://github.com/llvm/llvm-project/pull/98442.diff

1 Files Affected:

  • (modified) clang/test/Driver/loongarch-msimd.c (+4-38)
diff --git a/clang/test/Driver/loongarch-msimd.c b/clang/test/Driver/loongarch-msimd.c
index 984f3e8bf2bfc..cd463300c8747 100644
--- a/clang/test/Driver/loongarch-msimd.c
+++ b/clang/test/Driver/loongarch-msimd.c
@@ -2,128 +2,94 @@
 
 /// COM: -msimd=none
 // RUN: %clang --target=loongarch64 -mlasx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 // RUN: %clang --target=loongarch64 -mlasx -mlsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 
 // RUN: %clang --target=loongarch64 -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mlsx -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlsx -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mlsx -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mlsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mlsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlsx -msimd=none -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 
 
 /// COM: -msimd=lsx
 // RUN: %clang --target=loongarch64 -mlasx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 // RUN: %clang --target=loongarch64 -mlasx -mlsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlsx -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mlsx -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mlsx -mno-lsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 
 // RUN: %clang --target=loongarch64 -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mlsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 
 
 /// COM: -msimd=lasx
 // RUN: %clang --target=loongarch64 -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 // RUN: %clang --target=loongarch64 -mlasx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 // RUN: %clang --target=loongarch64 -mlasx -mlsx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 // RUN: %clang --target=loongarch64 -mlsx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,LASX
 
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=NOLSX,NOLASX
 
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mlsx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mno-lasx -mlsx -msimd=lasx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -mlsx -msimd=lsx -fsyntax-only %s -### 2>&1 | \
-// RUN:   grep -o '"-target-feature" "+[[:alnum:]]\+"' | sort -r | \
 // RUN:   FileCheck %s --check-prefixes=LSX,NOLASX
 
 
-// LSX: "-target-feature" "+lsx"
-// LASX: "-target-feature" "+lasx"
+// NOLSX-NOT: "-target-feature" "+lsx"
+// NOLASX-NOT: "-target-feature" "+lasx"
+// LSX-DAG: "-target-feature" "+lsx"
+// LASX-DAG: "-target-feature" "+lasx"
 // NOLSX-NOT: "-target-feature" "+lsx"
 // NOLASX-NOT: "-target-feature" "+lasx"

@SixWeining SixWeining merged commit 74b933c into llvm:main Jul 11, 2024
8 of 9 checks passed
@ylzsx ylzsx deleted the yangzhaoxin branch July 12, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants