[llvm] [AMDGPU] Auto-generating lit test patterns (NFC) (PR #93837)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 02:52:23 PDT 2024


================
@@ -1,95 +1,311 @@
-; RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s --check-prefixes=R600,ALL
-; RUN: llc < %s -mtriple=amdgcn -verify-machineinstrs | FileCheck %s --check-prefixes=GFX6,GFX678,ALL
-; RUN: llc < %s -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefixes=GFX8,GFX678,ALL
-; RUN: llc < %s -mtriple=amdgcn-amd-amdpal -mcpu=gfx1030 -verify-machineinstrs | FileCheck %s --check-prefixes=GFX10,GFX1011,ALL
-; RUN: llc < %s -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -amdgpu-enable-vopd=0 -verify-machineinstrs | FileCheck %s --check-prefixes=GFX11,GFX1011,ALL
-; RUN: llc < %s -mtriple=amdgcn -mcpu=gfx940 | FileCheck %s --check-prefixes=GFX940,ALL
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s --check-prefixes=R600
+; RUN: llc < %s -mtriple=amdgcn -verify-machineinstrs | FileCheck %s --check-prefixes=GCN
+; RUN: llc < %s -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefixes=GFX8
+; RUN: llc < %s -mtriple=amdgcn-amd-amdpal -mcpu=gfx1030 -verify-machineinstrs | FileCheck %s --check-prefixes=GFX10
+; RUN: llc < %s -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -amdgpu-enable-vopd=0 -verify-machineinstrs | FileCheck %s --check-prefixes=GFX11
+; RUN: llc < %s -mtriple=amdgcn -mcpu=gfx940 | FileCheck %s --check-prefixes=GFX940
----------------
arsenm wrote:

> > Test content could probably use some cleanup and regularization too. Might also want to split out r600?
> 
> I don't the original intention of the test to do further clean up. What do you mean by split out r600?
> 

I mean have a separate r600 version of the test so we don't have mixed r600 and amdgcn run lines

> > If you are generating checks, there's no reason to keep -mattr=-flat-for-global
> 
> Why?
> 

Because the main reason we have this anywhere was to make the gfx6/7 output closer to match gfx8 when handwriting checks


> > Should drop the -verify-machineinstrs. Should also try adding common prefixes?
> > Why not -verify-machineinstrs?

It's very expensive. It is on by default in EXPENSIVE_CHECKS builds, so we should only be using it in targeted tests for verifier errors and not just blindly add it to every test as we've usually done 


https://github.com/llvm/llvm-project/pull/93837


More information about the llvm-commits mailing list