Skip to content

Commit

Permalink
[LoongArch][clang] Modify loongarch-msimd.c to avoid grep -o. NFC (
Browse files Browse the repository at this point in the history
  • Loading branch information
ylzsx authored Jul 11, 2024
1 parent 18e70a4 commit 74b933c
Showing 1 changed file with 4 additions and 38 deletions.
42 changes: 4 additions & 38 deletions clang/test/Driver/loongarch-msimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 74b933c

Please sign in to comment.