From d4c4bd6b20926508e3eee567a0d1e9eb44dec028 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Fri, 9 Dec 2022 00:54:35 +0300 Subject: [PATCH] [NFC] Port codegen AMDGPU tests that invoke opt to `-passes=` syntax --- llvm/test/CodeGen/AMDGPU/amdgpu-unroll-threshold.ll | 2 +- llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll | 8 ++++---- llvm/test/CodeGen/AMDGPU/inline-maxbb.ll | 8 ++++---- llvm/test/CodeGen/AMDGPU/loop-idiom.ll | 6 +++--- llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll | 2 +- llvm/test/CodeGen/AMDGPU/opencl-printf.ll | 8 ++++---- .../AMDGPU/propagate-attributes-function-pointer-argument.ll | 2 +- llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll | 2 +- llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll | 4 ++-- llvm/test/CodeGen/AMDGPU/simplify-libcalls2.ll | 4 ++-- llvm/test/CodeGen/AMDGPU/speculative-execution-freecasts.ll | 2 +- llvm/test/CodeGen/AMDGPU/stress-calls.ll | 2 +- llvm/test/CodeGen/AMDGPU/tti-unroll-prefs.ll | 2 +- llvm/test/CodeGen/AMDGPU/unify-metadata.ll | 4 ++-- llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll | 2 +- 15 files changed, 29 insertions(+), 29 deletions(-) diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-unroll-threshold.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-unroll-threshold.ll index 7a22f66..cee80e3 100644 --- a/llvm/test/CodeGen/AMDGPU/amdgpu-unroll-threshold.ll +++ b/llvm/test/CodeGen/AMDGPU/amdgpu-unroll-threshold.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax < %s -S -mtriple=amdgcn-- -loop-unroll | FileCheck %s +; RUN: opt < %s -S -mtriple=amdgcn-- -passes=loop-unroll | FileCheck %s ; Check that the loop in unroll_default is not fully unrolled using the default ; unroll threshold diff --git a/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll b/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll index d66a1a3..788487f 100644 --- a/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll +++ b/llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address.ll @@ -1,7 +1,7 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -passes=amdgpu-always-inline -amdgpu-enable-lower-module-lds=false %s | FileCheck --check-prefix=ALL %s target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5" diff --git a/llvm/test/CodeGen/AMDGPU/inline-maxbb.ll b/llvm/test/CodeGen/AMDGPU/inline-maxbb.ll index 429db4d..375f5fd 100644 --- a/llvm/test/CodeGen/AMDGPU/inline-maxbb.ll +++ b/llvm/test/CodeGen/AMDGPU/inline-maxbb.ll @@ -1,7 +1,7 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-- -inline -S -amdgpu-inline-max-bb=2 %s | FileCheck %s --check-prefix=NOINL -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-- -inline -S -amdgpu-inline-max-bb=3 %s | FileCheck %s --check-prefix=INL -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-- -passes=inline -S -amdgpu-inline-max-bb=2 %s | FileCheck %s --check-prefix=NOINL -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-- -passes=inline -S -amdgpu-inline-max-bb=3 %s | FileCheck %s --check-prefix=INL +; RUN: opt -mtriple=amdgcn-- -passes='cgscc(inline)' -S -amdgpu-inline-max-bb=2 %s | FileCheck %s --check-prefix=NOINL +; RUN: opt -mtriple=amdgcn-- -passes='cgscc(inline)' -S -amdgpu-inline-max-bb=3 %s | FileCheck %s --check-prefix=INL +; RUN: opt -mtriple=amdgcn-- -passes=inline -S -amdgpu-inline-max-bb=2 %s | FileCheck %s --check-prefix=NOINL +; RUN: opt -mtriple=amdgcn-- -passes=inline -S -amdgpu-inline-max-bb=3 %s | FileCheck %s --check-prefix=INL define i32 @callee(i32 %x) { entry: diff --git a/llvm/test/CodeGen/AMDGPU/loop-idiom.ll b/llvm/test/CodeGen/AMDGPU/loop-idiom.ll index d97974eee..a274774 100644 --- a/llvm/test/CodeGen/AMDGPU/loop-idiom.ll +++ b/llvm/test/CodeGen/AMDGPU/loop-idiom.ll @@ -1,6 +1,6 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -loop-idiom -S < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600 --check-prefix=FUNC %s -; RUN: opt -temporarily-allow-old-pass-syntax -loop-idiom -S < %s -march=amdgcn -mcpu=tahiti -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s -; RUN: opt -temporarily-allow-old-pass-syntax -loop-idiom -S < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s +; RUN: opt -passes=loop-idiom -S < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600 --check-prefix=FUNC %s +; RUN: opt -passes=loop-idiom -S < %s -march=amdgcn -mcpu=tahiti -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s +; RUN: opt -passes=loop-idiom -S < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5" diff --git a/llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll b/llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll index 6cdbeee..8bfbfe2 100644 --- a/llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll +++ b/llvm/test/CodeGen/AMDGPU/opencl-printf-and-hostcall.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-unknown-unknown -amdgpu-printf-runtime-binding < %s 2>&1 | FileCheck %s +; RUN: opt -S -mtriple=amdgcn-unknown-unknown -passes=amdgpu-printf-runtime-binding < %s 2>&1 | FileCheck %s @.str = private unnamed_addr addrspace(4) constant [6 x i8] c"%s:%d\00", align 1 diff --git a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll index 786c822..c00b71f 100644 --- a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll +++ b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll @@ -1,7 +1,7 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=r600-- -amdgpu-printf-runtime-binding -mcpu=r600 -S < %s | FileCheck --check-prefix=FUNC --check-prefix=R600 %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-- -amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn--amdhsa -amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn--amdhsa -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s +; RUN: opt -mtriple=r600-- -passes=amdgpu-printf-runtime-binding -mcpu=r600 -S < %s | FileCheck --check-prefix=FUNC --check-prefix=R600 %s +; RUN: opt -mtriple=amdgcn-- -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s +; RUN: opt -mtriple=amdgcn--amdhsa -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s +; RUN: opt -mtriple=amdgcn--amdhsa -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=FUNC --check-prefix=GCN %s ; FUNC-LABEL: @test_kernel( ; R600-LABEL: entry diff --git a/llvm/test/CodeGen/AMDGPU/propagate-attributes-function-pointer-argument.ll b/llvm/test/CodeGen/AMDGPU/propagate-attributes-function-pointer-argument.ll index cdf636b..1584888 100644 --- a/llvm/test/CodeGen/AMDGPU/propagate-attributes-function-pointer-argument.ll +++ b/llvm/test/CodeGen/AMDGPU/propagate-attributes-function-pointer-argument.ll @@ -8,7 +8,7 @@ ; `call void @g(ptr @g.1)` ; which is invalid IR. -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -amdgpu-propagate-attributes-late %s | FileCheck %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-propagate-attributes-late %s | FileCheck %s ; CHECK-LABEL: define amdgpu_kernel void @thiswasabug() #0 ; CHECK-NOT: call void @g(ptr @g.1) diff --git a/llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll b/llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll index 5706e925..c27525c 100644 --- a/llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll +++ b/llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -loop-unroll -unroll-threshold=2000 -S < %s | llc -march=r600 -mcpu=cypress | FileCheck %s +; RUN: opt -passes=loop-unroll -unroll-threshold=2000 -S < %s | llc -march=r600 -mcpu=cypress | FileCheck %s ; REQUIRES: asserts ; CHECK: {{^}}alu_limits: diff --git a/llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll b/llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll index 3b911eb..f9f8173 100644 --- a/llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll +++ b/llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll @@ -1,5 +1,5 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-amd-amdhsa -S -amdgpu-lower-kernel-attributes -instcombine %s | FileCheck -enable-var-scope %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn-amd-amdhsa -S -passes=amdgpu-lower-kernel-attributes,instcombine %s | FileCheck -enable-var-scope %s +; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes=amdgpu-lower-kernel-attributes,instcombine %s | FileCheck -enable-var-scope %s +; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes=amdgpu-lower-kernel-attributes,instcombine %s | FileCheck -enable-var-scope %s target datalayout = "n32" diff --git a/llvm/test/CodeGen/AMDGPU/simplify-libcalls2.ll b/llvm/test/CodeGen/AMDGPU/simplify-libcalls2.ll index e9952f0..44678c7 100644 --- a/llvm/test/CodeGen/AMDGPU/simplify-libcalls2.ll +++ b/llvm/test/CodeGen/AMDGPU/simplify-libcalls2.ll @@ -1,6 +1,6 @@ ; REQUIRES: asserts -; RUN: opt -temporarily-allow-old-pass-syntax -S -amdgpu-simplifylib -debug-only=amdgpu-simplifylib -mtriple=amdgcn-unknown-amdhsa -disable-output < %s 2>&1 | FileCheck %s -; RUN: opt -temporarily-allow-old-pass-syntax -S -passes=amdgpu-simplifylib -debug-only=amdgpu-simplifylib -mtriple=amdgcn-unknown-amdhsa -disable-output < %s 2>&1 | FileCheck %s +; RUN: opt -S -passes=amdgpu-simplifylib -debug-only=amdgpu-simplifylib -mtriple=amdgcn-unknown-amdhsa -disable-output < %s 2>&1 | FileCheck %s +; RUN: opt -S -passes=amdgpu-simplifylib -debug-only=amdgpu-simplifylib -mtriple=amdgcn-unknown-amdhsa -disable-output < %s 2>&1 | FileCheck %s ; CHECK-NOT: AMDIC: try folding call void @llvm.lifetime.start.p0 ; CHECK-NOT: AMDIC: try folding call void @llvm.lifetime.end.p0 diff --git a/llvm/test/CodeGen/AMDGPU/speculative-execution-freecasts.ll b/llvm/test/CodeGen/AMDGPU/speculative-execution-freecasts.ll index 247801e..376a746 100644 --- a/llvm/test/CodeGen/AMDGPU/speculative-execution-freecasts.ll +++ b/llvm/test/CodeGen/AMDGPU/speculative-execution-freecasts.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax < %s -S -mtriple=amdgcn-unknown-amdhsa -speculative-execution \ +; RUN: opt < %s -S -mtriple=amdgcn-unknown-amdhsa -passes=speculative-execution \ ; RUN: -spec-exec-max-speculation-cost 1 -spec-exec-max-not-hoisted 1 \ ; RUN: | FileCheck %s diff --git a/llvm/test/CodeGen/AMDGPU/stress-calls.ll b/llvm/test/CodeGen/AMDGPU/stress-calls.ll index ffb3a1d..16b8650 100644 --- a/llvm/test/CodeGen/AMDGPU/stress-calls.ll +++ b/llvm/test/CodeGen/AMDGPU/stress-calls.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -amdgpu-always-inline %s | FileCheck %s +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-stress-function-calls -passes=amdgpu-always-inline %s | FileCheck %s ; CHECK: define internal fastcc i32 @alwaysinline_func(i32 %a) #0 { define internal fastcc i32 @alwaysinline_func(i32 %a) alwaysinline { diff --git a/llvm/test/CodeGen/AMDGPU/tti-unroll-prefs.ll b/llvm/test/CodeGen/AMDGPU/tti-unroll-prefs.ll index 3721502..14d7f7f 100644 --- a/llvm/test/CodeGen/AMDGPU/tti-unroll-prefs.ll +++ b/llvm/test/CodeGen/AMDGPU/tti-unroll-prefs.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -loop-unroll -S -mtriple=amdgcn-- -mcpu=tahiti %s | FileCheck %s +; RUN: opt -passes=loop-unroll -S -mtriple=amdgcn-- -mcpu=tahiti %s | FileCheck %s ; This IR comes from this OpenCL C code: ; diff --git a/llvm/test/CodeGen/AMDGPU/unify-metadata.ll b/llvm/test/CodeGen/AMDGPU/unify-metadata.ll index 9ee6d4d7..455993b 100644 --- a/llvm/test/CodeGen/AMDGPU/unify-metadata.ll +++ b/llvm/test/CodeGen/AMDGPU/unify-metadata.ll @@ -1,5 +1,5 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn--amdhsa -amdgpu-unify-metadata -S < %s | FileCheck -check-prefix=ALL %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=amdgcn--amdhsa -passes=amdgpu-unify-metadata -S < %s | FileCheck -check-prefix=ALL %s +; RUN: opt -mtriple=amdgcn--amdhsa -passes=amdgpu-unify-metadata -S < %s | FileCheck -check-prefix=ALL %s +; RUN: opt -mtriple=amdgcn--amdhsa -passes=amdgpu-unify-metadata -S < %s | FileCheck -check-prefix=ALL %s ; This test check that we have a singe metadata value after linking several ; modules for records such as opencl.ocl.version, llvm.ident and similar. diff --git a/llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll b/llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll index cc3ad36..9ade550 100644 --- a/llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll +++ b/llvm/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll @@ -1,4 +1,4 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -S -mtriple=amdgcn-- -load-store-vectorizer < %s | FileCheck -check-prefix=OPT %s +; RUN: opt -S -mtriple=amdgcn-- -passes=load-store-vectorizer < %s | FileCheck -check-prefix=OPT %s ; OPT-LABEL: @func( define void @func(i32 addrspace(7)* %out) { -- 2.7.4