================
@@ -0,0 +1,72 @@
+// RUN: %clang_cc1 -O0 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s
-o - | FileCheck %s --check-prefix=CIR-O0
+// RUN: %clang_cc1 -O2 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s
-o - | FileCheck %s --check-prefix=CIR-O2
+// RUN: %clang_cc1 -O0 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm
%s -o - | FileCheck %s --check-prefix=LLVM
+// RUN: %clang_cc1 -O0 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - |
FileCheck %s --check-prefix=OGCG
+
+extern void __attribute__((noinline)) bar(void);
+
+void expect(int x) {
+ if (__builtin_expect(x, 0))
----------------
adams381 wrote:
pred-info-builtins.c is focused on (1) O0 vs O2 CIR output, including that we
don’t emit cir.expect at O0, and (2) the LLVM/OGCG runs with -O2
-disable-llvm-passes. builtin_call.cpp covers the builtin call lowering at a
single optimization level. I added a short header comment in
pred-info-builtins.c to document this.
https://github.com/llvm/llvm-project/pull/178093
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits