[PATCH] D150829: [clang] Convert several tests to opaque pointers

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 06:33:36 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
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)
----------------
barannikov88 wrote:
> This looks suspicious to me. The first gep index has i32 type (used to be i64). The two other geps have it i64.
> 
This is okay -- it's an artifact of using a DL-unaware constant folder in Clang CodeGen. Index types will get canonicalized once a DL-aware folder sees them.


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