================
@@ -0,0 +1,67 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c23
-I%S/../../CodeGen/Inputs -fclangir -emit-cir %s -o - | FileCheck %s
+
+#include <stdbit.h>
+
+void test_stdc_trailing_zeros(unsigned long long x) {
+ int cnt = __builtin_stdc_trailing_zeros(x);
+ (void)cnt;
+}
+
+// CHECK-LABEL: test_stdc_trailing_zeros
+// CHECK: cir.ctz
+// CHECK-NOT: poison_zero
----------------
bcardosolopes wrote:
This can never fail. `poison_zero` prints on the same line as the op, `cir.ctz
%0 poison_zero : !u64i`, so `CHECK: cir.ctz` matches either way and `CHECK-NOT`
only scans what comes after it. Pin the whole line instead: `CHECK: cir.ctz
%{{.+}} : !u64i`. Same for the other three.
https://github.com/llvm/llvm-project/pull/214931
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits