[clang] 8b2f8b3 - [NFC} update CodeGenHLSL tests to use cc1 instead of driver-mode

Xiang Li via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 17 00:26:31 PDT 2022


Author: Xiang Li
Date: 2022-09-17T00:11:44-07:00
New Revision: 8b2f8b309885e872ad98af381ee5459716955877

URL: https://github.com/llvm/llvm-project/commit/8b2f8b309885e872ad98af381ee5459716955877
DIFF: https://github.com/llvm/llvm-project/commit/8b2f8b309885e872ad98af381ee5459716955877.diff

LOG: [NFC} update CodeGenHLSL tests to use cc1 instead of driver-mode

Added: 
    

Modified: 
    clang/test/CodeGenHLSL/basic_types.hlsl
    clang/test/CodeGenHLSL/entry.hlsl
    clang/test/CodeGenHLSL/float3.hlsl
    clang/test/CodeGenHLSL/half.hlsl
    clang/test/CodeGenHLSL/shader_type_attr.hlsl

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenHLSL/basic_types.hlsl b/clang/test/CodeGenHLSL/basic_types.hlsl
index f76e134743e54..d26d94910c2d8 100644
--- a/clang/test/CodeGenHLSL/basic_types.hlsl
+++ b/clang/test/CodeGenHLSL/basic_types.hlsl
@@ -1,10 +1,19 @@
-// RUN: %clang_dxc  -Tlib_6_7 -fcgl -Fo - %s | FileCheck %s
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
 
-// FIXME: check 16bit types once enable-16bit-types is ready.
 
+// CHECK:"?uint16_t_Val@@3GA" = global i16 0, align 2
+// CHECK:"?int16_t_Val@@3FA" = global i16 0, align 2
 // CHECK:"?uint_Val@@3IA" = global i32 0, align 4
 // CHECK:"?uint64_t_Val@@3KA" = global i64 0, align 8
 // CHECK:"?int64_t_Val@@3JA" = global i64 0, align 8
+// CHECK:"?int16_t2_Val@@3T?$__vector at F$01 at __clang@@A" = global <2 x i16> zeroinitializer, align 4
+// CHECK:"?int16_t3_Val@@3T?$__vector at F$02 at __clang@@A" = global <3 x i16> zeroinitializer, align 8
+// CHECK:"?int16_t4_Val@@3T?$__vector at F$03 at __clang@@A" = global <4 x i16> zeroinitializer, align 8
+// CHECK:"?uint16_t2_Val@@3T?$__vector at G$01 at __clang@@A" = global <2 x i16> zeroinitializer, align 4
+// CHECK:"?uint16_t3_Val@@3T?$__vector at G$02 at __clang@@A" = global <3 x i16> zeroinitializer, align 8
+// CHECK:"?uint16_t4_Val@@3T?$__vector at G$03 at __clang@@A" = global <4 x i16> zeroinitializer, align 8
 // CHECK:"?int2_Val@@3T?$__vector at H$01 at __clang@@A" = global <2 x i32> zeroinitializer, align 8
 // CHECK:"?int3_Val@@3T?$__vector at H$02 at __clang@@A" = global <3 x i32> zeroinitializer, align 16
 // CHECK:"?int4_Val@@3T?$__vector at H$03 at __clang@@A" = global <4 x i32> zeroinitializer, align 16
@@ -17,6 +26,9 @@
 // CHECK:"?uint64_t2_Val@@3T?$__vector at K$01 at __clang@@A" = global <2 x i64> zeroinitializer, align 16
 // CHECK:"?uint64_t3_Val@@3T?$__vector at K$02 at __clang@@A" = global <3 x i64> zeroinitializer, align 32
 // CHECK:"?uint64_t4_Val@@3T?$__vector at K$03 at __clang@@A" = global <4 x i64> zeroinitializer, align 32
+// CHECK:"?half2_Val@@3T?$__vector@$f16@$01 at __clang@@A" = global <2 x half> zeroinitializer, align 4
+// CHECK:"?half3_Val@@3T?$__vector@$f16@$02 at __clang@@A" = global <3 x half> zeroinitializer, align 8
+// CHECK:"?half4_Val@@3T?$__vector@$f16@$03 at __clang@@A" = global <4 x half> zeroinitializer, align 8
 // CHECK:"?float2_Val@@3T?$__vector at M$01 at __clang@@A" = global <2 x float> zeroinitializer, align 8
 // CHECK:"?float3_Val@@3T?$__vector at M$02 at __clang@@A" = global <3 x float> zeroinitializer, align 16
 // CHECK:"?float4_Val@@3T?$__vector at M$03 at __clang@@A" = global <4 x float> zeroinitializer, align 16

diff  --git a/clang/test/CodeGenHLSL/entry.hlsl b/clang/test/CodeGenHLSL/entry.hlsl
index 1a1a507358246..9757a2be582fb 100644
--- a/clang/test/CodeGenHLSL/entry.hlsl
+++ b/clang/test/CodeGenHLSL/entry.hlsl
@@ -1,4 +1,6 @@
-// RUN: %clang --driver-mode=dxc -Tcs_6_1 -Efoo -fcgl  -Fo - %s | FileCheck %s
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-compute %s -hlsl-entry foo \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
 
 // Make sure not mangle entry.
 // CHECK:define void @foo()

diff  --git a/clang/test/CodeGenHLSL/float3.hlsl b/clang/test/CodeGenHLSL/float3.hlsl
index 4adda8dee1214..63379349d9bd7 100644
--- a/clang/test/CodeGenHLSL/float3.hlsl
+++ b/clang/test/CodeGenHLSL/float3.hlsl
@@ -1,4 +1,6 @@
-// RUN: %clang --driver-mode=dxc -Tlib_6_7 -fcgl  -Fo - %s | FileCheck %s
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
 
 // Make sure float3 is not changed into float4.
 // CHECK:<3 x float> @"?foo@@YAT?$__vector at M$02 at __clang@@T12@@Z"(<3 x float> noundef %[[PARAM:[0-9a-zA-Z]+]])

diff  --git a/clang/test/CodeGenHLSL/half.hlsl b/clang/test/CodeGenHLSL/half.hlsl
index 90ef77f4bec54..e83a6fc715b8a 100644
--- a/clang/test/CodeGenHLSL/half.hlsl
+++ b/clang/test/CodeGenHLSL/half.hlsl
@@ -1,5 +1,11 @@
-// RUN: %clang_dxc -Tlib_6_7 -fcgl  -Fo - %s | FileCheck %s --check-prefix=FLOAT
-// RUN: %clang_dxc -Tlib_6_7 -enable-16bit-types -fcgl  -Fo - %s | FileCheck %s --check-prefix=HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=HALF
+
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=FLOAT
+
 
 // Make sure use float when not enable-16bit-types.
 // FLOAT:define {{.*}}float @"?foo@@YA$halff@$halff at 0@Z"(float{{[^,]+}}, float{{[^,)]+}})

diff  --git a/clang/test/CodeGenHLSL/shader_type_attr.hlsl b/clang/test/CodeGenHLSL/shader_type_attr.hlsl
index 8bc7a9c0953e5..ef51769ec0666 100644
--- a/clang/test/CodeGenHLSL/shader_type_attr.hlsl
+++ b/clang/test/CodeGenHLSL/shader_type_attr.hlsl
@@ -1,4 +1,6 @@
-// RUN: %clang --driver-mode=dxc -Tlib_6_x -fcgl -Fo - %s | FileCheck %s
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
 
 // Make sure not mangle entry.
 // CHECK:define void @foo()


        


More information about the cfe-commits mailing list