aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2022-11-17 08:14:44 +0000
committerTamar Christina <tamar.christina@arm.com>2022-11-17 08:14:44 +0000
commit1bc7efa948f75131aa29d5a2337641c4e39fc7c6 (patch)
tree4598b09bba6e389886337b01c379e1ebac74b6c0 /gcc
parent2b2f2ee49a33419f9d19f548e6a8ce520818a5d2 (diff)
downloadgcc-1bc7efa948f75131aa29d5a2337641c4e39fc7c6.zip
gcc-1bc7efa948f75131aa29d5a2337641c4e39fc7c6.tar.gz
gcc-1bc7efa948f75131aa29d5a2337641c4e39fc7c6.tar.bz2
middle-end: replace GET_MODE_WIDER_MODE with GET_MODE_NEXT_MODE
After the fix to the addsub patch yesterday for bootstrap I had only regtested on x86. While looking today it seemed the new tests were failing, this was caused by a change in the behavior of the GET_MODE_WIDER_MODE macro on trunk. gcc/ChangeLog: * match.pd: Replace GET_MODE_WIDER_MODE with custom code.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/match.pd11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/match.pd b/gcc/match.pd
index 39edc89..fe1178c 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -7940,12 +7940,15 @@ and,
vec_perm_indices sel (builder, 2, nelts);
machine_mode vec_mode = TYPE_MODE (type);
machine_mode wide_mode;
+ scalar_mode wide_elt_mode;
+ poly_uint64 wide_nunits;
+ scalar_mode inner_mode = GET_MODE_INNER (vec_mode);
}
(if (sel.series_p (0, 2, 0, 2)
- && GET_MODE_WIDER_MODE (vec_mode).exists (&wide_mode)
- && VECTOR_MODE_P (wide_mode)
- && (GET_MODE_UNIT_BITSIZE (vec_mode) * 2
- == GET_MODE_UNIT_BITSIZE (wide_mode)))
+ && GET_MODE_2XWIDER_MODE (inner_mode).exists (&wide_elt_mode)
+ && multiple_p (GET_MODE_NUNITS (vec_mode), 2, &wide_nunits)
+ && related_vector_mode (vec_mode, wide_elt_mode,
+ wide_nunits).exists (&wide_mode))
(with
{
tree stype