[PATCH] D150829: [clang] Convert several tests to opaque pointers
Sergei Barannikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 17 16:32:33 PDT 2023
barannikov88 added a comment.
These did require some intellectual work. I've noted changes that might be worth noticing.
================
Comment at: clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp:22
+// CHECK: store i32 0, ptr @arr
+// CHECK: call void @_ZN1AC1EPKc(ptr {{[^,]*}} getelementptr inbounds (%struct.S, ptr @arr, i32 0, i32 1), ptr noundef @.str)
+// CHECK: store i32 1, ptr getelementptr inbounds (%struct.S, ptr @arr, i64 1)
----------------
This looks suspicious to me. The first gep index has i32 type (used to be i64). The two other geps have it i64.
================
Comment at: clang/test/CodeGenCXX/address-space-cast-coerce.cpp:50
-// CHECK: %[[a:[^ ]+]] = addrspacecast i16 addrspace(5)* %{{[^ ]+}} to i16*
-// CHECK: %[[a:[^ ]+]] = addrspacecast %{{[^ ]+}} addrspace(5)* %{{[^ ]+}} to %{{[^ ]+}}
----------------
There is only one addrspacecast in this function. The second one matches a line in the other function.
I believe this is not intended. [[ https://reviews.llvm.org/D53780?vs=172261&id=172671#toc | The review ]] was iterative, I think they just forgot to update the test.
================
Comment at: clang/test/CodeGenCXX/aix-alignment.cpp:22
+// AIX64: [[PTR:%.+]] = getelementptr inbounds i8, ptr %call, i64 -8
+// AIX: %{{.+}} = load i{{[0-9]+}}, ptr [[PTR]]
void bar() { delete[] allocBp(); }
----------------
Since bitcasts disappeared, added this load as an anchor.
================
Comment at: clang/test/CodeGenCXX/attr-musttail.cpp:60
-// CHECK: %call = musttail call noundef i32 %8(%class.Foo* noundef nonnull align 1 dereferenceable(1) %this.adjusted, i32 noundef %9)
+// CHECK: %call = musttail call noundef i32 %5(ptr noundef nonnull align 1 dereferenceable(1) %1, i32 noundef %6)
----------------
This test relies on exact value numbering. I didn't try to go smart about it and just updated the numbers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150829/new/
https://reviews.llvm.org/D150829
More information about the cfe-commits
mailing list