[clang] [CIR][X86] Implement convert_half builtins (PR #171615)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 10 05:40:33 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 85818 tests passed
* 754 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CIR/CodeGen/X86/cir-convert-half.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c -o -
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:17:54: error: passing '__m512' (vector of 16 'float' values) to parameter of incompatible type 'int'
# | 17 | return __builtin_ia32_vcvtph2ps512_mask(a, src, k, passthru);
# | | ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:24:54: error: too many arguments to function call, expected 3, have 4
# | 24 | return __builtin_ia32_vcvtph2ps256_mask(a, src, k, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:31:51: error: too many arguments to function call, expected 3, have 4
# | 31 | return __builtin_ia32_vcvtph2ps_mask(a, src, k, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:38:56: error: too many arguments to function call, expected 3, have 4
# | 38 | return __builtin_ia32_cvtneps2bf16_512_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:45:56: error: too many arguments to function call, expected 3, have 4
# | 45 | return __builtin_ia32_cvtneps2bf16_256_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:52:56: error: too many arguments to function call, expected 3, have 4
# | 52 | return __builtin_ia32_cvtneps2bf16_128_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:19:15: error: CIR-LABEL: expected string not found in input
# | // CIR-LABEL: cir.func {{.*}}@test_vcvtph2ps512_mask
# | ^
# | <stdin>:1:1: note: scanning from here
# | module @"/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c" attributes {cir.lang = #cir.lang<c>, cir.triple = "x86_64-unknown-linux-gnu", dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>} {
# | ^
# | <stdin>:3:97: note: possible intended match here
# | #loc = loc("/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c":0:0)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: module @"/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c" attributes {cir.lang = #cir.lang<c>, cir.triple = "x86_64-unknown-linux-gnu", dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>} {
# | label:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: } loc(#loc)
# | label:19'0 ~~~~~~~~~~~~
# | 3: #loc = loc("/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c":0:0)
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:19'1 ? possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CIR/CodeGen/X86/cir-convert-half.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c -o -
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:17:54: error: passing '__m512' (vector of 16 'float' values) to parameter of incompatible type 'int'
# | 17 | return __builtin_ia32_vcvtph2ps512_mask(a, src, k, passthru);
# | | ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:24:54: error: too many arguments to function call, expected 3, have 4
# | 24 | return __builtin_ia32_vcvtph2ps256_mask(a, src, k, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:31:51: error: too many arguments to function call, expected 3, have 4
# | 31 | return __builtin_ia32_vcvtph2ps_mask(a, src, k, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:38:56: error: too many arguments to function call, expected 3, have 4
# | 38 | return __builtin_ia32_cvtneps2bf16_512_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:45:56: error: too many arguments to function call, expected 3, have 4
# | 45 | return __builtin_ia32_cvtneps2bf16_256_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:52:56: error: too many arguments to function call, expected 3, have 4
# | 52 | return __builtin_ia32_cvtneps2bf16_128_mask(a, w, u, passthru);
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c:19:15: error: CIR-LABEL: expected string not found in input
# | // CIR-LABEL: cir.func {{.*}}@test_vcvtph2ps512_mask
# | ^
# | <stdin>:1:1: note: scanning from here
# | module @"/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c" attributes {cir.lang = #cir.lang<c>, cir.triple = "x86_64-unknown-linux-gnu", dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>} {
# | ^
# | <stdin>:3:97: note: possible intended match here
# | #loc = loc("/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c":0:0)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: module @"/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c" attributes {cir.lang = #cir.lang<c>, cir.triple = "x86_64-unknown-linux-gnu", dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>} {
# | label:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: } loc(#loc)
# | label:19'0 ~~~~~~~~~~~~
# | 3: #loc = loc("/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/X86/cir-convert-half.c":0:0)
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:19'1 ? possible intended match
# | >>>>>>
# `-----------------------------
# 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/171615
More information about the cfe-commits
mailing list