[clang] [clang] Add nuw attribute to GEPs (PR #105496)

Hari Limaye via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 06:27:51 PDT 2024


================
@@ -7,13 +7,6 @@
 struct X { int a[2]; };
 extern int bar();
 
-//.
-// CHECK: @test.i23 = internal global i32 4, align 4
-// CHECK: @i = global i32 4, align 4
-// CHECK: @Arr = global [100 x i32] zeroinitializer, align 16
-// CHECK: @foo2.X = internal global ptr getelementptr (i8, ptr @Arr, i64 196), align 8
-// CHECK: @foo2.i23 = internal global i32 0, align 4
----------------
hazzlim wrote:

Yeah, possibly something that could be addressed in the script if desired - not sure how much it comes up.

Ok great, I've updated the `--global-value-regex` argument and fixed up the missing global CHECKs.

https://github.com/llvm/llvm-project/pull/105496


More information about the cfe-commits mailing list