[llvm] [llubi] Add basic support for icmp, terminators and function calls (PR #181393)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 14 01:15:52 PST 2026


================
@@ -204,6 +206,39 @@ class InstExecutor : public InstVisitor<InstExecutor, void> {
     });
   }
 
+  void jumpTo(Instruction &Terminator, BasicBlock *DestBB) {
+    if (!Handler.onBBJump(Terminator, *DestBB))
+      return;
+    BasicBlock *From = CurrentFrame->BB;
+    CurrentFrame->BB = DestBB;
+    CurrentFrame->PC = DestBB->begin();
+    // Update PHI nodes in batch to avoid the interference between PHI nodes.
+    // We need to store the incoming values into a temporary buffer.
+    // Otherwise, the incoming value may be overwritten before it is
+    // used by other PHI nodes.
----------------
nikic wrote:

Do we have a test for this?

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


More information about the llvm-commits mailing list