diff options
author | Robin Dapp <rdapp@ventanamicro.com> | 2023-06-29 11:35:02 +0200 |
---|---|---|
committer | Robin Dapp <rdapp@ventanamicro.com> | 2023-06-29 13:02:19 +0200 |
commit | 16e4f09a594f801f68eb0a3e35d1c6e60d402b64 (patch) | |
tree | d7b26dcaea34c3069f154ab19c6715a912d0a8d7 | |
parent | 2b31dc28c752146d2917a1702d20eac12701d034 (diff) | |
download | gcc-16e4f09a594f801f68eb0a3e35d1c6e60d402b64.zip gcc-16e4f09a594f801f68eb0a3e35d1c6e60d402b64.tar.gz gcc-16e4f09a594f801f68eb0a3e35d1c6e60d402b64.tar.bz2 |
tree-ssa-math-opts: Use element_precision.
The recent TYPE_PRECISION changes to detect improper usage
cause an ICE in divmod_candidate_p for RVV when called with
a vector type. Therefore, use element_precision instead.
gcc/ChangeLog:
* tree-ssa-math-opts.cc (divmod_candidate_p): Use
element_precision.
-rw-r--r-- | gcc/tree-ssa-math-opts.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index da01d4a..701fce2 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -4995,8 +4995,8 @@ divmod_candidate_p (gassign *stmt) if (integer_pow2p (op2)) return false; - if (TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT - && TYPE_PRECISION (type) <= BITS_PER_WORD) + if (element_precision (type) <= HOST_BITS_PER_WIDE_INT + && element_precision (type) <= BITS_PER_WORD) return false; /* If the divisor is not power of 2 and the precision wider than |