11// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.6-library -S -fnative-half-type -finclude-default-header -o - -ast-dump %s | FileCheck %s
2- // RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
3- // RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
4- // RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s \
5- // RUN: --check-prefixes=CHECKIR
2+ // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECKIR
63void Fn (double2 D);
74void Fn (half2 H);
85
@@ -42,7 +39,8 @@ void Fn3( int64_t2 p0);
4239// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int64_t2':'long __attribute__((ext_vector_type(2)))' <FloatingToIntegral>
4340// CHECK-NEXT: ImplicitCastExpr {{.*}} 'half2':'half __attribute__((ext_vector_type(2)))' <LValueToRValue>
4441// CHECK-NEXT: DeclRefExpr {{.*}} 'half2':'half __attribute__((ext_vector_type(2)))' lvalue ParmVar {{.*}} 'p0' 'half2':'half __attribute__((ext_vector_type(2)))'
45- // CHECKIR: %conv = fptosi <2 x half> %0 to <2 x i64>
42+ // CHECKIR-LABEL: Call3
43+ // CHECKIR: %conv = fptosi <2 x half> {{.*}} to <2 x i64>
4644void Call3 (half2 p0) {
4745 Fn3 (p0);
4846}
@@ -54,7 +52,8 @@ void Call3(half2 p0) {
5452// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int64_t2':'long __attribute__((ext_vector_type(2)))' <FloatingToIntegral>
5553// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float2':'float __attribute__((ext_vector_type(2)))' <LValueToRValue>
5654// CHECK-NEXT: DeclRefExpr {{.*}} 'float2':'float __attribute__((ext_vector_type(2)))' lvalue ParmVar {{.*}} 'p0' 'float2':'float __attribute__((ext_vector_type(2)))'
57- // CHECKIR: %conv = fptosi <2 x float> %0 to <2 x i64>
55+ // CHECKIR-LABEL: Call4
56+ // CHECKIR: {{.*}} = fptosi <2 x float> {{.*}} to <2 x i64>
5857void Call4 (float2 p0) {
5958 Fn3 (p0);
6059}
@@ -68,7 +67,8 @@ void Fn4( float2 p0);
6867// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float2':'float __attribute__((ext_vector_type(2)))' <IntegralToFloating>
6968// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int64_t2':'long __attribute__((ext_vector_type(2)))' <LValueToRValue>
7069// CHECK-NEXT: DeclRefExpr {{.*}} 'int64_t2':'long __attribute__((ext_vector_type(2)))' lvalue ParmVar {{.*}} 'p0' 'int64_t2':'long __attribute__((ext_vector_type(2)))'
71- // CHECKIR: %conv = sitofp <2 x i64> %0 to <2 x float>
70+ // CHECKIR-LABEL: Call5
71+ // CHECKIR: {{.*}} = sitofp <2 x i64> {{.*}} to <2 x float>
7272void Call5 (int64_t2 p0) {
7373 Fn4 (p0);
7474}
0 commit comments