aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/d-target.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2023-03-03 00:00:44 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2023-03-03 01:25:45 +0100
commit929c6b8cd12a3bd338a4c250274a9d86da5b2ea7 (patch)
tree44cc9a476333506c4dbecff672f3b91446af7727 /gcc/d/d-target.cc
parentce1cea3e22f58bbddde017f8a92e59bae8892339 (diff)
downloadgcc-929c6b8cd12a3bd338a4c250274a9d86da5b2ea7.zip
gcc-929c6b8cd12a3bd338a4c250274a9d86da5b2ea7.tar.gz
gcc-929c6b8cd12a3bd338a4c250274a9d86da5b2ea7.tar.bz2
d: Allow vectors to be compared for identity [PR108946]
Vector equality and comparisons are now accepted by the language implementation, but identity wasn't. Implement it as an extra integer comparison of the bit-casted bitmask. PR d/108946 gcc/d/ChangeLog: * d-target.cc (Target::isVectorOpSupported): Allow identity ops. * expr.cc (ExprVisitor::visit (IdentityExp *)): Handle vector identity comparisons. gcc/testsuite/ChangeLog: * gdc.dg/simd2a.d: Update test. * gdc.dg/simd2b.d: Likewise. * gdc.dg/simd2c.d: Likewise. * gdc.dg/simd2d.d: Likewise. * gdc.dg/simd2e.d: Likewise. * gdc.dg/simd2f.d: Likewise. * gdc.dg/simd2g.d: Likewise. * gdc.dg/simd2h.d: Likewise. * gdc.dg/simd2i.d: Likewise. * gdc.dg/simd2j.d: Likewise.
Diffstat (limited to 'gcc/d/d-target.cc')
-rw-r--r--gcc/d/d-target.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/d/d-target.cc b/gcc/d/d-target.cc
index 5eab570..4c7a212 100644
--- a/gcc/d/d-target.cc
+++ b/gcc/d/d-target.cc
@@ -323,11 +323,6 @@ Target::isVectorOpSupported (Type *type, EXP op, Type *)
/* Logical operators must have a result type of bool. */
return false;
- case EXP::identity:
- case EXP::notIdentity:
- /* Comparison operators must have a result type of bool. */
- return false;
-
default:
break;
}