[clang] [CIR][X86] Emit cir.clz/cir.ctz for lzcnt/tzcnt builtins (PR #222669)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 12:08:31 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 63603 tests passed
* 829 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir -cir-call-conv-lowering=target=x86_64 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir -cir-call-conv-lowering=target=x86_64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:48:12: error: CHECK: expected string not found in input
# |  // CHECK: not yet implemented for type '!cir.union<"UOverAligned"
# |            ^
# | <stdin>:1:1: note: scanning from here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:173:47: error: failed to verify 'element_type': any cir boolean, integer, floating point
# | ^
# | <stdin>:2:31: note: possible intended match here
# |  cir.func @take_ptr_vector(%arg0: !cir.vector<2 x !cir.ptr<!s32i>>) {
# |                               ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:173:47: error: failed to verify 'element_type': any cir boolean, integer, floating point 
# | check:48'0    {                                                                                                                                                                                                                    search range start (exclusive)
# | check:48'1                                                                                                                                                                                                                         error: no match found in search range
# |             2:  cir.func @take_ptr_vector(%arg0: !cir.vector<2 x !cir.ptr<!s32i>>) { 
# | check:48'2                                   ?                                         possible intended match
# |             3:  ^ 
# | check:48'3        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir -cir-call-conv-lowering=target=x86_64 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir -cir-call-conv-lowering=target=x86_64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:48:12: error: CHECK: expected string not found in input
# |  // CHECK: not yet implemented for type '!cir.union<"UOverAligned"
# |            ^
# | <stdin>:1:1: note: scanning from here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:173:47: error: failed to verify 'element_type': any cir boolean, integer, floating point
# | ^
# | <stdin>:2:31: note: possible intended match here
# |  cir.func @take_ptr_vector(%arg0: !cir.vector<2 x !cir.ptr<!s32i>>) {
# |                               ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir:173:47: error: failed to verify 'element_type': any cir boolean, integer, floating point 
# | check:48'0    {                                                                                                                                                                                                                    search range start (exclusive)
# | check:48'1                                                                                                                                                                                                                         error: no match found in search range
# |             2:  cir.func @take_ptr_vector(%arg0: !cir.vector<2 x !cir.ptr<!s32i>>) { 
# | check:48'2                                   ?                                         possible intended match
# |             3:  ^ 
# | check:48'3        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list