[clang] [CIR] Only scan globals and constants for block addresses in GotoSolver (PR #232870)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 16:54:43 PDT 2026


================
@@ -88,3 +90,64 @@ cir.func @d() {
 // CHECK:   cir.indirect_br %[[DEST]] : !cir.ptr<!void>, [
 // CHECK:   ^[[L1BB]]
 // CHECK:   ]
+
+cir.func @e() {
+  %0 = cir.alloca "ptr" align(8) init : !cir.ptr<!cir.ptr<!void>>
+  %1 = cir.block_address <@e, "a"> : !cir.ptr<!void>
+  %2 = cir.const #cir.block_addr_info<@e, "b"> : !cir.ptr<!void>
----------------
andykaylor wrote:

This isn't used. It looks like we collected it and added it as a possible indirect branch target, but it seems like some future DCE could break this test unexpectedly.

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


More information about the cfe-commits mailing list