[llvm] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

Pravin Jagtap via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 22:13:05 PDT 2023


https://github.com/pravinjagtap created https://github.com/llvm/llvm-project/pull/71019

Missed adding code model test during #70760.

>From ef0118818249da417706db7f8e7086d051d17d50 Mon Sep 17 00:00:00 2001
From: Pravin Jagtap <Pravin.Jagtap at amd.com>
Date: Thu, 2 Nov 2023 01:05:35 -0400
Subject: [PATCH] [AMDGPU] Add code model (#70760) test for amdgpu target.

---
 llvm/test/CodeGen/AMDGPU/codemodel.ll | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 llvm/test/CodeGen/AMDGPU/codemodel.ll

diff --git a/llvm/test/CodeGen/AMDGPU/codemodel.ll b/llvm/test/CodeGen/AMDGPU/codemodel.ll
new file mode 100644
index 000000000000000..8b60257b2076aed
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/codemodel.ll
@@ -0,0 +1,9 @@
+; RUN: not llc -verify-machineinstrs -o - -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY
+; RUN: not llc -verify-machineinstrs -o - -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL
+
+; TINY:    Target does not support the tiny CodeModel
+; KERNEL:    Target does not support the kernel CodeModel
+
+define void @foo() {
+  ret void
+}



More information about the llvm-commits mailing list