================
@@ -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))
+    bar();
+}
+// CIR-O0: cir.func dso_local @expect
----------------
andykaylor wrote:

```suggestion
// CIR-O0: cir.func {{.*}} @expect
```
This test failed in CI because the `no_inline` keyword was present. It's a good 
practice to use a wildcard to match any and all keywords in cases where you 
don't care about the decorators. This applies throughout these tests.

https://github.com/llvm/llvm-project/pull/178093
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to