[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

Florian Mayer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 26 18:03:22 PDT 2025


https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/145999

>From 6b21e00652860816ac3d7d8969fd34325661df06 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 26 Jun 2025 18:03:10 -0700
Subject: [PATCH] more testr

Created using spr 1.3.4
---
 clang/test/CodeGen/fallow-runtime-check-skip-hot-cutoff.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/clang/test/CodeGen/fallow-runtime-check-skip-hot-cutoff.c b/clang/test/CodeGen/fallow-runtime-check-skip-hot-cutoff.c
index cede7530d2a22..0f1cdf9512395 100644
--- a/clang/test/CodeGen/fallow-runtime-check-skip-hot-cutoff.c
+++ b/clang/test/CodeGen/fallow-runtime-check-skip-hot-cutoff.c
@@ -1,8 +1,14 @@
 // RUN: %clang -fallow-runtime-check-skip-hot-cutoff=1.0 -S -emit-llvm %s -o - -O2 | FileCheck --check-prefix=ONE %s
 // RUN: %clang -fallow-runtime-check-skip-hot-cutoff=0.0 -S -emit-llvm %s -o - -O2 | FileCheck --check-prefix=ZERO %s
+// RUN: not %clang -fallow-runtime-check-skip-hot-cutoff=6.0 -S -emit-llvm %s -o - -O2 2>&1 | FileCheck --check-prefix=SIX %s
+// RUN: not %clang -fallow-runtime-check-skip-hot-cutoff=-1.0 -S -emit-llvm %s -o - -O2 2>&1 | FileCheck --check-prefix=MINUSONE %s
+// RUN: not %clang -fallow-runtime-check-skip-hot-cutoff=string -S -emit-llvm %s -o - -O2 2>&1 | FileCheck --check-prefix=STRING %s
 
 // ONE: ret i32 0
 // ZERO: ret i32 1
+// SIX: invalid value '6.0' in '-fallow-runtime-check-skip-hot-cutoff='
+// MINUSONE: invalid value '-1.0' in '-fallow-runtime-check-skip-hot-cutoff='
+// STRING: invalid value 'string' in '-fallow-runtime-check-skip-hot-cutoff='
 
 int main(int argc, char** argv) {
     return __builtin_allow_runtime_check("foo");



More information about the llvm-branch-commits mailing list