[clang] ff96567 - [NFC] Fix failing test introduced in #67700
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 10:03:50 PST 2023
Author: Chris Bieneman
Date: 2023-11-29T12:02:44-06:00
New Revision: ff96567bd0fb8ed7a4739afa27a3cf3908115021
URL: https://github.com/llvm/llvm-project/commit/ff96567bd0fb8ed7a4739afa27a3cf3908115021
DIFF: https://github.com/llvm/llvm-project/commit/ff96567bd0fb8ed7a4739afa27a3cf3908115021.diff
LOG: [NFC] Fix failing test introduced in #67700
This fixes the test to handle the changes in the AST printer.
../clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
Added:
Modified:
clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
Removed:
################################################################################
diff --git a/clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl b/clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
index 57d55dcc9de0b7f..4ffbcacf3f30c04 100644
--- a/clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
+++ b/clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl
@@ -2,6 +2,7 @@
// RUN: -finclude-default-header -ast-dump %s | FileCheck %s
+// CHECK-LABEL: ToTwoInts
// CHECK: ExtVectorElementExpr {{.*}} 'int __attribute__((ext_vector_type(2)))' xx
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int __attribute__((ext_vector_type(1)))' lvalue <VectorSplat>
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'V' 'int'
@@ -10,6 +11,7 @@ int2 ToTwoInts(int V){
return V.xx;
}
+// CHECK-LABEL: ToFourFloats
// CHECK: ExtVectorElementExpr {{.*}} 'float __attribute__((ext_vector_type(4)))' rrrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float __attribute__((ext_vector_type(1)))' lvalue <VectorSplat>
// CHECK-NEXT: DeclRefExpr {{.*}} 'float' lvalue ParmVar {{.*}} 'V' 'float'
@@ -19,6 +21,7 @@ float4 ToFourFloats(float V){
return V.rrrr;
}
+// CHECK-LABEL: FillOne
// CHECK: ExtVectorElementExpr {{.*}} 'int __attribute__((ext_vector_type(2)))' xx
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'int __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: IntegerLiteral {{.*}} 'int' 1
@@ -27,7 +30,7 @@ int2 FillOne(){
return 1.xx;
}
-
+// CHECK-LABEL: FillOneUnsigned
// CHECK: ExtVectorElementExpr {{.*}} 'unsigned int __attribute__((ext_vector_type(3)))' xxx
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: IntegerLiteral {{.*}} 'unsigned int' 1
@@ -36,6 +39,7 @@ uint3 FillOneUnsigned(){
return 1u.xxx;
}
+// CHECK-LABEL: FillOneUnsignedLong
// CHECK: ExtVectorElementExpr {{.*}} 'unsigned long __attribute__((ext_vector_type(4)))' xxxx
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned long __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: IntegerLiteral {{.*}} 'unsigned long' 1
@@ -44,6 +48,7 @@ vector<uint64_t,4> FillOneUnsignedLong(){
return 1ul.xxxx;
}
+// CHECK-LABEL: FillTwoPointFive
// CHECK: ExtVectorElementExpr {{.*}} 'double __attribute__((ext_vector_type(2)))' rr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: FloatingLiteral {{.*}} 'double' 2.500000e+00
@@ -52,6 +57,7 @@ double2 FillTwoPointFive(){
return 2.5.rr;
}
+// CHECK-LABEL: FillOneHalf
// CHECK: ExtVectorElementExpr {{.*}} 'double __attribute__((ext_vector_type(3)))' rrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: FloatingLiteral {{.*}} 'double' 5.000000e-01
@@ -60,6 +66,7 @@ double3 FillOneHalf(){
return .5.rrr;
}
+// CHECK-LABEL: FillTwoPointFiveFloat
// CHECK: ExtVectorElementExpr {{.*}} 'float __attribute__((ext_vector_type(4)))' rrrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: FloatingLiteral {{.*}} 'float' 2.500000e+00
@@ -72,6 +79,7 @@ float4 FillTwoPointFiveFloat(){
// truncated vector, this AST formulation has an initialization list to
// initialze the returned vector.
+// CHECK-LABEL: FillOneHalfFloat
// CHECK: InitListExpr {{.*}} 'vector<float, 1>':'float __attribute__((ext_vector_type(1)))'
// CHECK-NEXT: ExtVectorElementExpr {{.*}} 'float' r
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float __attribute__((ext_vector_type(1)))' <VectorSplat>
@@ -81,6 +89,7 @@ vector<float, 1> FillOneHalfFloat(){
return .5f.r;
}
+// CHECK-LABEL: HowManyFloats
// CHECK: ExtVectorElementExpr {{.*}} 'float __attribute__((ext_vector_type(2)))' rr
// CHECK-NEXT: ExtVectorElementExpr {{.*}} 'float __attribute__((ext_vector_type(2)))' rr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float __attribute__((ext_vector_type(1)))' lvalue <VectorSplat>
@@ -90,6 +99,7 @@ float2 HowManyFloats(float V) {
return V.rr.rr;
}
+// CHECK-LABEL: HooBoy
// CHECK: ExtVectorElementExpr {{.*}} 'long __attribute__((ext_vector_type(4)))' xxxx
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'long __attribute__((ext_vector_type(1)))' <VectorSplat>
// CHECK-NEXT: IntegerLiteral {{.*}} 'long' 4
@@ -102,11 +112,11 @@ int64_t4 HooBoy() {
// is a double->float conversion, which results in generating an initializtion
// list with float truncation casts.
-
+// CHECK-LABEL: AllRighty
// CHECK: InitListExpr {{.*}} 'float3':'float __attribute__((ext_vector_type(3)))'
// Vector element 0:
-// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float':'float' <FloatingCast>
+// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float' <FloatingCast>
// CHECK-NEXT: ArraySubscriptExpr {{.*}} 'double'
// CHECK-NEXT: ExtVectorElementExpr {{.*}} 'double __attribute__((ext_vector_type(3)))' rrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double __attribute__((ext_vector_type(1)))' <VectorSplat>
@@ -114,7 +124,7 @@ int64_t4 HooBoy() {
// CHECK-NEXT: IntegerLiteral {{.*}} 'int' 0
// Vector element 1:
-// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float':'float' <FloatingCast>
+// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float' <FloatingCast>
// CHECK-NEXT: ArraySubscriptExpr {{.*}} 'double'
// CHECK-NEXT: ExtVectorElementExpr {{.*}} 'double __attribute__((ext_vector_type(3)))' rrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double __attribute__((ext_vector_type(1)))' <VectorSplat>
@@ -122,7 +132,7 @@ int64_t4 HooBoy() {
// CHECK-NEXT: IntegerLiteral {{.*}} 'int' 1
// Vector element 2:
-// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float':'float' <FloatingCast>
+// CHECK-NEXT: ImplicitCastExpr {{.*}} 'float' <FloatingCast>
// CHECK-NEXT: ArraySubscriptExpr {{.*}} 'double'
// CHECK-NEXT: ExtVectorElementExpr {{.*}} 'double __attribute__((ext_vector_type(3)))' rrr
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double __attribute__((ext_vector_type(1)))' <VectorSplat>
More information about the cfe-commits
mailing list