tint: Fix type is_signed_integer helpers which were ignoring abstracts

Abstracts are now considered scalars, so these should be returning true for abstract-integers.

Change-Id: If15f87932d412663d2aef4f9737675a8ece9e551
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101181
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-09-05 10:43:03 +00:00 committed by Dawn LUCI CQ
parent 3740ac6092
commit 0cd830c571
1 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ bool Type::is_integer_scalar() const {
}
bool Type::is_signed_integer_scalar() const {
return Is<I32>();
return IsAnyOf<I32, AbstractInt>();
}
bool Type::is_unsigned_integer_scalar() const {
@ -113,7 +113,7 @@ bool Type::is_unsigned_integer_scalar() const {
}
bool Type::is_signed_integer_vector() const {
return Is([](const Vector* v) { return v->type()->IsAnyOf<I32>(); });
return Is([](const Vector* v) { return v->type()->IsAnyOf<I32, AbstractInt>(); });
}
bool Type::is_unsigned_integer_vector() const {
@ -125,7 +125,7 @@ bool Type::is_unsigned_scalar_or_vector() const {
}
bool Type::is_signed_scalar_or_vector() const {
return Is<I32>() || is_signed_integer_vector();
return IsAnyOf<I32, AbstractInt>() || is_signed_integer_vector();
}
bool Type::is_integer_scalar_or_vector() const {