[Bug target/124194] [16 Regression] wrong code with __builtin_ia32_cmpd256_mask( op := TRUE )
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 26 08:11:23 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124194
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:3275b86a822b23ad2e332d2425ac3d6abcb2105a
commit r16-7712-g3275b86a822b23ad2e332d2425ac3d6abcb2105a
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Thu Feb 26 08:07:12 2026 +0000
PR target/124194: Fix __builtin_ia32_cmpd256_mask(op,op,TRUE)
This patch fixes the wrong code regression PR target/124194 on x86_64.
The target implements a pre-reload splitter that recognizes that
integer vector comparisons can be evaluated at compile-time when the
operands being compared are the same (register). The (admittedly rare)
case when the comparison operator is always-true, was incorrectly
handled and folded to false instead of the correct value true.
2025-02-26 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
PR target/124194
* config/i386/sse.md (*<avx512>_cmp<mode>3_dup_op): Also return
CONSTM1_RTX for the case cmp_imm == 7 (predicate TRUE).
gcc/testsuite/ChangeLog
PR target/124194
* gcc.target/i386/pr124194.c: New test case.
More information about the Gcc-bugs
mailing list