https://gcc.gnu.org/g:8e76945889cc2525359ef3c82088e0842f463f42
commit r16-7583-g8e76945889cc2525359ef3c82088e0842f463f42 Author: Jakub Jelinek <[email protected]> Date: Thu Feb 19 07:56:59 2026 +0100 i386: Use IN_RANGE in avx_vpermilp_parallel On Wed, Feb 18, 2026 at 10:00:38AM +0100, Uros Bizjak wrote: > BTW: Maybe IN_RANGE should be used more in this function? IMO, > "!IN_RANGE (ipar[i], 2,3)" is easier to comprehend. This patch does that. 2026-02-19 Jakub Jelinek <[email protected]> * config/i386/i386.cc (avx_vpermilp_parallel): Use IN_RANGE macro. Diff: --- gcc/config/i386/i386.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 407d652fa998..52f82185e328 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -20677,13 +20677,13 @@ avx_vpermilp_parallel (rtx par, machine_mode mode) then fallthru. */ for (i = 4; i < 6; ++i) { - if (ipar[i] < 4 || ipar[i] >= 6) + if (!IN_RANGE (ipar[i], 4, 5)) return 0; mask |= (ipar[i] - 4) << i; } for (i = 6; i < 8; ++i) { - if (ipar[i] < 6) + if (!IN_RANGE (ipar[i], 6, 7)) return 0; mask |= (ipar[i] - 6) << i; } @@ -20695,13 +20695,13 @@ avx_vpermilp_parallel (rtx par, machine_mode mode) a 128-bit lane. */ for (i = 0; i < 2; ++i) { - if (ipar[i] >= 2) + if (!IN_RANGE (ipar[i], 0, 1)) return 0; mask |= ipar[i] << i; } for (i = 2; i < 4; ++i) { - if (ipar[i] < 2 || ipar[i] >= 4) + if (!IN_RANGE (ipar[i], 2, 3)) return 0; mask |= (ipar[i] - 2) << i; }
