[clang] [Clang] Allow non-constant sizes for __builtin_assume_dereferenceable. (PR #156929)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 4 10:21:49 PDT 2025
================
@@ -32,3 +32,62 @@ int test2(int *a) {
__builtin_assume_dereferenceable(a, 32ull);
return a[0];
}
+
+// CHECK-LABEL: @test3(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
----------------
erichkeane wrote:
Alignments in the tests make this a touch fragile, but I see the rest of the test does it, so *YOLO*.
https://github.com/llvm/llvm-project/pull/156929
More information about the cfe-commits
mailing list