diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-05-17 12:10:30 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-05-17 12:10:30 +0200 |
commit | 254cbf72661b932eb039220fccef9a2546ab8f4e (patch) | |
tree | a2ac77a581832b625452049403485f5b06aea5e8 /gcc/gimple-range.cc | |
parent | 4f94c38a9237b728b3a3f76c169b5b47f6c45187 (diff) | |
download | gcc-254cbf72661b932eb039220fccef9a2546ab8f4e.zip gcc-254cbf72661b932eb039220fccef9a2546ab8f4e.tar.gz gcc-254cbf72661b932eb039220fccef9a2546ab8f4e.tar.bz2 |
i386: Fix up V2DI and V1TI inequality comparisons [PR105613]
The recent r13-458 change to introduce vec_cmpeqv1tiv1ti and
add TARGET_SSE2 support to vec_cmpeqv2div2di works nicely for
equality comparisons, but as the testcase shows doesn't work
for inequality comparisons.
For EQ if we perform comparison with twice as many half-sized elemenets,
the result should be ~0 when both halves are ~0 only (both halves need
to be equal for the whole to be equal), otherwise 0, so AND is the
correct operation for it.
But for NE, the result should be ~0 when either of the halves is ~0
(if either half is not equal, the whole is not equal) and so the right
operation for NE is IOR, not AND.
2022-05-17 Jakub Jelinek <jakub@redhat.com>
PR target/105613
* config/i386/sse.md (vec_cmpeqv2div2di, vec_cmpeqv1tiv1ti): Use
andv4si3 only for EQ, for NE use iorv4si3 instead.
* gcc.c-torture/execute/pr105613.c: New test.
Diffstat (limited to 'gcc/gimple-range.cc')
0 files changed, 0 insertions, 0 deletions