aboutsummaryrefslogtreecommitdiff
path: root/gcc/edit-context.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-03-15 10:46:47 +0100
committerJakub Jelinek <jakub@redhat.com>2024-03-15 11:04:29 +0100
commitab2da8fb67b1aa0557a16b62689a888730dba610 (patch)
tree32ae3b821516aaccd8fff27538184ca0611d5934 /gcc/edit-context.cc
parent7dd3b2b09cbeb6712ec680a0445cb0ad41070423 (diff)
downloadgcc-ab2da8fb67b1aa0557a16b62689a888730dba610.zip
gcc-ab2da8fb67b1aa0557a16b62689a888730dba610.tar.gz
gcc-ab2da8fb67b1aa0557a16b62689a888730dba610.tar.bz2
i386: Fix a pasto in ix86_expand_int_sse_cmp [PR114339]
In r13-3803-gfa271afb58 I've added an optimization for LE/LEU/GE/GEU comparison against CONST_VECTOR. As the comments say: /* x <= cst can be handled as x < cst + 1 unless there is wrap around in cst + 1. */ ... /* For LE punt if some element is signed maximum. */ ... /* For LEU punt if some element is unsigned maximum. */ and /* x >= cst can be handled as x > cst - 1 unless there is wrap around in cst - 1. */ ... /* For GE punt if some element is signed minimum. */ ... /* For GEU punt if some element is zero. */ Apparently I wrote the GE/GEU (second case) first and then copied/adjusted it for LE/LEU, most of the adjustments look correct, but I've left if (code == GE) comparison when testing if it should punt for signed maximum. That condition is never true, because this is in switch (code) { ... case LE: case LEU: block and we really meant to be what the comment says, for LE punt if some element is signed maximum, as then cst + 1 wraps around. The following patch fixes the pasto. 2024-03-15 Jakub Jelinek <jakub@redhat.com> PR target/114339 * config/i386/i386-expand.cc (ix86_expand_int_sse_cmp) <case LE>: Fix a pasto, compare code against LE rather than GE. * gcc.target/i386/pr114339.c: New test.
Diffstat (limited to 'gcc/edit-context.cc')
0 files changed, 0 insertions, 0 deletions