[clang] [CIR] Avoid folding non-integer constants as integer casts (PR #214551)

Kunal Dubey via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 9 01:07:57 PDT 2026


================
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -verify %s -o - | FileCheck %s
+
+void test_stdc_trailing_zeros_undef_cast(unsigned long long x) {
+  // expected-error at +1 {{ClangIR code gen Not Yet Implemented: unimplemented builtin call: __builtin_stdc_trailing_zeros}}
----------------
xakep8 wrote:

Good Point I'll move this test to `clang/test/CIR/Transforms/canonicalize.cir` so that I directly test the folding of undef.

https://github.com/llvm/llvm-project/pull/214551


More information about the cfe-commits mailing list