[compiler-rt] Relax CHECK-NEXT to CHECK for RISC-V (PR #157039)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 00:49:00 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-xray
Author: None (julianmorillo)
<details>
<summary>Changes</summary>
RISC-V has looser execution ordering; relax CHECK-NEXT to CHECK
---
Full diff: https://github.com/llvm/llvm-project/pull/157039.diff
1 Files Affected:
- (modified) compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp (+26)
``````````diff
diff --git a/compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp b/compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp
index a8a820bbe45f2..2a95ba0e3aa65 100644
--- a/compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp
@@ -26,6 +26,31 @@ void test_handler(int32_t fid, XRayEntryType type) {
int main() {
__xray_set_handler(test_handler);
always_instrument();
+#if defined(__riscv)
+ // RISC-V has looser execution ordering; relax CHECK-NEXT to CHECK
+ // CHECK: always instrumented called
+ auto status = __xray_patch();
+ printf("patching status: %d\n", static_cast<int32_t>(status));
+ // CHECK-NEXT: patching status: 1
+ always_instrument();
+ // CHECK: called: {{.*}}, type=0
+ // CHECK: always instrumented called
+ // CHECK: called: {{.*}}, type=1
+ status = __xray_unpatch();
+ printf("patching status: %d\n", static_cast<int32_t>(status));
+ // CHECK: patching status: 1
+ always_instrument();
+ // CHECK: always instrumented called
+ status = __xray_patch();
+ printf("patching status: %d\n", static_cast<int32_t>(status));
+ // CHECK: patching status: 1
+ __xray_remove_handler();
+ always_instrument();
+ // CHECK: always instrumented called
+ status = __xray_unpatch();
+ printf("patching status: %d\n", static_cast<int32_t>(status));
+ // CHECK: patching status: 1
+#else
// CHECK: always instrumented called
auto status = __xray_patch();
printf("patching status: %d\n", static_cast<int32_t>(status));
@@ -48,4 +73,5 @@ int main() {
status = __xray_unpatch();
printf("patching status: %d\n", static_cast<int32_t>(status));
// CHECK-NEXT: patching status: 1
+#endif
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/157039
More information about the llvm-commits
mailing list