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

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 1 03:30:24 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:

This is allowed to capture the provenance so why is there UB?

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


More information about the llvm-commits mailing list