]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-math-opts: Use element_precision.
authorRobin Dapp <rdapp@ventanamicro.com>
Thu, 29 Jun 2023 09:35:02 +0000 (11:35 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Thu, 29 Jun 2023 11:02:19 +0000 (13:02 +0200)
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.

gcc/tree-ssa-math-opts.cc

index da01d4ab2b615ebb2621bb2d0992d535ecffb867..701fce2ab612a41e9f730ef84c95231078d4cbbd 100644 (file)
@@ -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