public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2188] tree-ssa-math-opts: Use element_precision.
@ 2023-06-29 11:08 Robin Dapp
0 siblings, 0 replies; only message in thread
From: Robin Dapp @ 2023-06-29 11:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:16e4f09a594f801f68eb0a3e35d1c6e60d402b64
commit r14-2188-g16e4f09a594f801f68eb0a3e35d1c6e60d402b64
Author: Robin Dapp <rdapp@ventanamicro.com>
Date: Thu Jun 29 11:35:02 2023 +0200
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.
Diff:
---
gcc/tree-ssa-math-opts.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
index da01d4ab2b6..701fce2ab61 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-29 11:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 11:08 [gcc r14-2188] tree-ssa-math-opts: Use element_precision Robin Dapp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).