[llvm] [LLVM][rtsan] Add RealtimeSanitizer transform pass (PR #101232)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 13:47:39 PDT 2024
================
@@ -0,0 +1,29 @@
+; RUN: opt < %s -passes=rtsan -S | FileCheck %s
+
+define i32 @example(i32 %x) #0 {
+entry:
+ %retval = alloca i32
+ %cmp = icmp sgt i32 %x, 10
+ br i1 %cmp, label %then, label %else
+
+then:
+ ret i32 1
+
+else:
+ ret i32 0
+}
+
+attributes #0 = { mustprogress noinline nonblocking optnone ssp uwtable(sync) }
+
+; RealtimeSanitizer pass should insert __rtsan_realtime_enter right after function definition
----------------
MaskRay wrote:
prefer `CHECK-LABEL: @example(` in case more functions are added in the future.
https://github.com/llvm/llvm-project/pull/101232
More information about the llvm-commits
mailing list