[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

Stuart Brady via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 03:07:33 PST 2021


stuart requested changes to this revision.
stuart added a comment.
This revision now requires changes to proceed.

Looks good, just some suggestions about the test.



================
Comment at: clang/test/CodeGenOpenCL/kernel-arg-info.cl:110
 
+kernel void foo9(signed char si1,  global const signed char* si2) {}
+// CHECK: define{{.*}} spir_kernel void @foo9{{[^!]+}}
----------------
Suggest `sc1` and `sc2` as these are now signed chars, not signed ints.


================
Comment at: clang/test/CodeGenOpenCL/kernel-arg-info.cl:112-118
+// CHECK: !kernel_arg_addr_space ![[SINT_AS_QUAL:[0-9]+]]
+// CHECK: !kernel_arg_access_qual ![[MD42]]
+// CHECK: !kernel_arg_type ![[SINT_TY:[0-9]+]]
+// CHECK: !kernel_arg_base_type ![[SINT_TY]]
+// CHECK: !kernel_arg_type_qual ![[SINT_QUAL:[0-9]+]]
+// CHECK-NOT: !kernel_arg_name
+// ARGINFO: !kernel_arg_name ![[SINT_ARG_NAMES:[0-9]+]]
----------------
Would suggest `SCHAR_AS_QUAL` and `SCHAR_TY` now that this is using a signed char.


================
Comment at: clang/test/CodeGenOpenCL/kernel-arg-info.cl:159-162
+// CHECK: ![[SINT_AS_QUAL]] = !{i32 0, i32 1}
+// CHECK: ![[SINT_TY]] = !{!"char", !"char*"}
+// CHECK: ![[SINT_QUAL]] = !{!"", !"const"}
+// ARGINFO: ![[SINT_ARG_NAMES]] = !{!"si1", !"si2"}
----------------
... and here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96161/new/

https://reviews.llvm.org/D96161



More information about the cfe-commits mailing list