[llvm] [BOLT] Not use hlt as split point when build the CFG (PR #150963)

Haibo Jiang via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 10 22:54:04 PDT 2025


================
@@ -0,0 +1,21 @@
+## Check CFG for halt instruction
+
+# RUN: %clang %cflags %s -static -o %t.exe -nostdlib
+# RUN: llvm-bolt %t.exe --print-cfg -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-CFG
+# RUN: llvm-objdump -d %t --print-imm-hex | FileCheck %s --check-prefix=CHECK-BIN
+
+# CHECK-CFG: BB Count    : 1
+# CHECK-BIN: <main>:
+# CHECK-BIN-NEXT: 55                            pushq   %rbp
+# CHECK-BIN-NEXT: 48 89 e5                      movq    %rsp, %rbp
+# CHECK-BIN-NEXT: f4                            hlt
+# CHECK-BIN-NEXT: c3                            retq
+
+.global main
+  .type main, %function
+main:
+        pushq   %rbp
+        movq    %rsp, %rbp
----------------
Jianghibo wrote:

gentle ping.

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


More information about the llvm-commits mailing list