[clang] [X86][Clang] allow CRC32 intrinsics to be used in constexp (PR #173908)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 21 03:19:55 PST 2026


github-actions[bot] wrote:

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

* 85876 tests passed
* 1216 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.CodeGen/X86/sse42-builtins.c</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# 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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror
# 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/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# note: command had no output on stdout or stderr
# RUN: at line 2
/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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# 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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror
# 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/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# note: command had no output on stdout or stderr
# 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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=i386-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK
# 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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=i386-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror
# 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/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK
# note: command had no output on stdout or stderr
# RUN: at line 4
/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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=i386-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK
# 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/23/include -nostdsysteminc -x c -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=i386-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror
# 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/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK
# note: command had no output on stdout or stderr
# RUN: at line 5
/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/23/include -nostdsysteminc -x c++ -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# 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/23/include -nostdsysteminc -x c++ -flax-vector-conversions=none -ffreestanding /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:141:16: error: static assertion failed due to requirement '_mm_crc32_u32(44190712, 4085109946U) == 350827643'
# |   141 | TEST_CONSTEXPR(_mm_crc32_u32(0x02a24bf8, 0xf37dd4ba) == 0x14e9347b);
# |       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:141:54: note: expression evaluates to '2122844148 == 350827643'
# |   141 | TEST_CONSTEXPR(_mm_crc32_u32(0x02a24bf8, 0xf37dd4ba) == 0x14e9347b);
# |       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:142:16: error: static assertion failed due to requirement '_mm_crc32_u32(215343375, 2200650471U) == 1464882880'
# |   142 | TEST_CONSTEXPR(_mm_crc32_u32(0x0cd5e10f, 0x832b42e7) == 0x575056c0);
# |       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:142:54: note: expression evaluates to '881727033 == 1464882880'
# |   142 | TEST_CONSTEXPR(_mm_crc32_u32(0x0cd5e10f, 0x832b42e7) == 0x575056c0);
# |       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:143:16: error: static assertion failed due to requirement '_mm_crc32_u32(1357330872, 3472570414U) == 1604487598'
# |   143 | TEST_CONSTEXPR(_mm_crc32_u32(0x50e739b8, 0xcefb382e) == 0x5fa289ae);
# |       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:143:54: note: expression evaluates to '139192539 == 1604487598'
# |   143 | TEST_CONSTEXPR(_mm_crc32_u32(0x50e739b8, 0xcefb382e) == 0x5fa289ae);
# |       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:144:16: error: static assertion failed due to requirement '_mm_crc32_u32(1009627414, 3549724477U) == 3113037293U'
# |   144 | TEST_CONSTEXPR(_mm_crc32_u32(0x3c2db116, 0xd3947f3d) == 0xb98d2ded);
# |       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c:144:54: note: expression evaluates to '1861871255 == 3113037293'
# |   144 | TEST_CONSTEXPR(_mm_crc32_u32(0x3c2db116, 0xd3947f3d) == 0xb98d2ded);
# |       |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/builtin_test_helpers.h:298:43: note: expanded from macro 'TEST_CONSTEXPR'
# |   298 | #define TEST_CONSTEXPR(...) static_assert(__VA_ARGS__)
# |       |                                           ^~~~~~~~~~~
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
# 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/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/X86/sse42-builtins.c --check-prefixes=CHECK,X64
# `-----------------------------
# error: command failed with exit status: 2

--

```
</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/173908


More information about the cfe-commits mailing list