[PATCH] D123176: [RISCV][NFC]Add some check prefixes to remove redundant checks in some IR tests
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 23:54:10 PDT 2022
benshi001 added inline comments.
================
Comment at: llvm/test/CodeGen/RISCV/rvv/ctlz-sdnode.ll:4
; RUN: llc -mtriple=riscv64 -mattr=+zve64x -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64,RV64I
-; RUN: llc -mtriple=riscv32 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32,RV32D
-; RUN: llc -mtriple=riscv64 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64,RV64D
+; RUN: llc -mtriple=riscv32 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-D,RV32,RV32D
+; RUN: llc -mtriple=riscv64 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-D,RV64,RV64D
----------------
I still see common checks shared by all four test lines, so can we get more reduction by setting the prefixes of line4 and line5 to `--check-prefixes=CHECK,CHECK-D,RV32,RV32D` ?
================
Comment at: llvm/test/CodeGen/RISCV/rvv/cttz-sdnode.ll:5
+; RUN: llc -mtriple=riscv32 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-D,RV32,RV32D
+; RUN: llc -mtriple=riscv64 -mattr=+v,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-D,RV64,RV64D
----------------
The same suggestion as abive, `--check-prefixes=CHECK,CHECK-D,RV32,RV32D`
================
Comment at: llvm/test/CodeGen/RISCV/ssub_sat.ll:2
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=riscv32 -mattr=+m | FileCheck %s --check-prefix=RV32I
-; RUN: llc < %s -mtriple=riscv64 -mattr=+m | FileCheck %s --check-prefix=RV64I
-; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+zbb | FileCheck %s --check-prefixes=RV32IZbb,RV32IZbbNOZbt
-; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+zbb | FileCheck %s --check-prefixes=RV64IZbb,RV64IZbbNOZbt
+; RUN: llc < %s -mtriple=riscv32 -mattr=+m | FileCheck %s --check-prefixes=CHECK-RV32,RV32I
+; RUN: llc < %s -mtriple=riscv64 -mattr=+m | FileCheck %s --check-prefixes=CHECK-RV64,RV64I
----------------
just simplify `CHECK-RV32` to `RV32` and `CHECK-RV64` to `RV64`
================
Comment at: llvm/test/CodeGen/RISCV/ssub_sat_plus.ll:5
+; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+zbb | FileCheck %s --check-prefixes=CHECK-RV32,RV32IZbb,RV32IZbbNOZbt
+; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+zbb | FileCheck %s --check-prefixes=CHECK-RV64,RV64IZbb,RV64IZbbNOZbt
; RUN: llc < %s -mtriple=riscv32 -mattr=+m,+zbb,+experimental-zbt | FileCheck %s --check-prefixes=RV32IZbb,RV32IZbbZbt
----------------
The save as above `CHECK-RV32` -> `RV32` and `CHECK-RV64` -> `RV64`
================
Comment at: llvm/test/CodeGen/RISCV/unfold-masked-merge-scalar-variablemask.ll:9
; RUN: llc -mtriple=riscv64 -mattr=+zbb < %s \
-; RUN: | FileCheck %s --check-prefixes=CHECK,RV64,RV64ZBB
+; RUN: | FileCheck %s --check-prefixes=ZBB,RV64,RV64ZBB
----------------
still, we should keep `CHECK` if there are common lines shared by all, and add a `CHECK-ZBB` for the lines shared only by the last two tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123176/new/
https://reviews.llvm.org/D123176
More information about the llvm-commits
mailing list