[llvm] [X86] Add support for indirect branch tracking in jump tables (PR #77679)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 13 02:20:16 PST 2024


================
@@ -0,0 +1,35 @@
+# RUN: llc %s -o - -mtriple=x86_64-- -run-pass=x86-ibt | FileCheck %s
----------------
phoebewang wrote:

Check for both `cf-protection-branch` equals to 1 and 2? You can you sed to do so, e.g.,
```
# RUN: sed 's/LEVEL/1/g' %s | llc %s -o - -mtriple=x86_64-- -run-pass=x86-ibt | FileCheck %s --check-prefixes=L1
# RUN: sed 's/LEVEL/2/g' %s | llc %s -o - -mtriple=x86_64-- -run-pass=x86-ibt | FileCheck %s --check-prefixes=L2
...
  !0 = !{i32 1, !"cf-protection-branch", i32 LEVEL}
```

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


More information about the llvm-commits mailing list