2022-02-04 14:19:23 -05:00
|
|
|
// Create module flag for code object version.
|
|
|
|
|
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
2024-01-23 17:08:18 +05:30
|
|
|
// RUN: -o - %s | FileCheck %s -check-prefix=V5
|
2022-02-04 14:19:23 -05:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
2022-09-21 00:32:57 -04:00
|
|
|
// RUN: -mcode-object-version=4 -o - %s | FileCheck -check-prefix=V4 %s
|
2022-02-04 14:19:23 -05:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
|
|
|
// RUN: -mcode-object-version=5 -o - %s | FileCheck -check-prefix=V5 %s
|
|
|
|
|
2024-02-05 08:19:53 +01:00
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
|
|
|
// RUN: -mcode-object-version=6 -o - %s | FileCheck -check-prefix=V6 %s
|
|
|
|
|
2022-02-04 14:19:23 -05:00
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
|
|
|
// RUN: -mcode-object-version=none -o - %s | FileCheck %s -check-prefix=NONE
|
|
|
|
|
|
|
|
// RUN: not %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
|
|
|
|
// RUN: -mcode-object-version=4.1 -o - %s 2>&1| FileCheck %s -check-prefix=INV
|
|
|
|
|
2024-03-06 09:51:48 -05:00
|
|
|
// V4: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 400}
|
|
|
|
// V5: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 500}
|
|
|
|
// V6: !{{.*}} = !{i32 1, !"amdhsa_code_object_version", i32 600}
|
|
|
|
// NONE-NOT: !{{.*}} = !{i32 1, !"amdhsa_code_object_version",
|
2022-02-04 14:19:23 -05:00
|
|
|
// INV: error: invalid value '4.1' in '-mcode-object-version=4.1'
|