================
@@ -0,0 +1,95 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py 
UTC_ARGS: --version 6
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes 
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <6 x float> 
@_Z5case1v(
+// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT:  [[ENTRY:.*:]]
+// CHECK-NEXT:    ret <6 x float> <float 0.000000e+00, float 2.000000e+00, 
float 4.000000e+00, float 1.000000e+00, float 3.000000e+00, float 5.000000e+00>
+//
+float3x2 case1() {
+  // vec[0] = 0
+  // vec[1] = 2
+  // vec[2] = 4
+  // vec[3] = 1
+  // vec[4] = 3
+  // vec[5] = 5
+  return float3x2(0, 1, 
+                  2, 3,
+                  4, 5);
+}
+
+
+RWStructuredBuffer<float> In;
+
+// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <6 x float> 
@_Z5case2v(
+// CHECK-SAME: ) #[[ATTR0]] {
+// CHECK-NEXT:  [[ENTRY:.*:]]
+// CHECK-NEXT:    [[CALL:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 0) #[[ATTR3:[0-9]+]]
+// CHECK-NEXT:    [[CALL1:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 1) #[[ATTR3]]
+// CHECK-NEXT:    [[CALL2:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 2) #[[ATTR3]]
+// CHECK-NEXT:    [[CALL3:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 3) #[[ATTR3]]
+// CHECK-NEXT:    [[CALL4:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 4) #[[ATTR3]]
+// CHECK-NEXT:    [[CALL5:%.*]] = call noundef nonnull align 4 
dereferenceable(4) ptr @_ZN4hlsl18RWStructuredBufferIfEixEj(ptr noundef nonnull 
align 4 dereferenceable(8) @_ZL2In, i32 noundef 5) #[[ATTR3]]
----------------
hekota wrote:

```suggestion
// CHECK-NEXT:    [[CALL:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 0)
// CHECK-NEXT:    [[CALL1:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 1)
// CHECK-NEXT:    [[CALL2:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 2)
// CHECK-NEXT:    [[CALL3:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 3)
// CHECK-NEXT:    [[CALL4:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 4)
// CHECK-NEXT:    [[CALL5:%.*]] = call {{.*}} ptr 
@_ZN4hlsl18RWStructuredBufferIfEixEj(ptr {{.*}} @_ZL2In, i32 noundef 5)
```
Just a nit - I like to regex-out the noisy parts to make it easier to read.

https://github.com/llvm/llvm-project/pull/166277
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to