[llvm] [llubi] Add support for captures (PR #201170)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 07:45:10 PDT 2026


================
@@ -0,0 +1,51 @@
+; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6
+; RUN: not llubi --verbose < %s 2>&1 | FileCheck %s
+
+target datalayout = "e-p:64:64:64"
+
+define ptr @mix_pointer(ptr %pa, ptr %pb) {
+  %ba = bitcast ptr %pa to <2 x b32>
+  %bb = bitcast ptr %pb to <2 x b32>
+  %bc = shufflevector <2 x b32> %ba, <2 x b32> %bb, <2 x i32> <i32 0, i32 3>
+  %pc = bitcast <2 x b32> %bc to ptr
+  ret ptr %pc
+}
+
+ at g = global ptr null
+
+define void @captured_by_mem(ptr captures(provenance) %a) {
----------------
RalfJung wrote:

Capturing the address is by definition independent of what happens with the provenance so I don't think it makes sense that anything would happen with the provenance of these pointers.

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


More information about the llvm-commits mailing list