aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-01-24 14:49:20 +0100
committerRichard Biener <rguenther@suse.de>2022-01-31 08:55:45 +0100
commit3c7067cc92281dcbfeaf64116d8416f2092b4c10 (patch)
tree0630ee958bf6b8c0acc00340e724df04c892bb63 /gcc/tree-cfg.cc
parentc67ffc256d01eeb293a7598ee553828a0b1e0a28 (diff)
downloadgcc-3c7067cc92281dcbfeaf64116d8416f2092b4c10.zip
gcc-3c7067cc92281dcbfeaf64116d8416f2092b4c10.tar.gz
gcc-3c7067cc92281dcbfeaf64116d8416f2092b4c10.tar.bz2
Reduce multiple_of_p uses
There are a few cases where we know we're dealing with (poly-)integer constants, so remove the use of multiple_of_p in those cases to make the PR100499 fix less impactful. 2022-01-24 Richard Biener <rguenther@suse.de> PR tree-optimization/100499 * tree-cfg.cc (verify_gimple_assign_ternary): Use multiple_p on poly-ints instead of multiple_of_p. * tree-ssa.cc (maybe_rewrite_mem_ref_base): Likewise. (non_rewritable_mem_ref_base): Likewise. (non_rewritable_lvalue_p): Likewise. (execute_update_addresses_taken): Likewise.
Diffstat (limited to 'gcc/tree-cfg.cc')
-rw-r--r--gcc/tree-cfg.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index efd1033..260a7fb 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -4410,7 +4410,8 @@ verify_gimple_assign_ternary (gassign *stmt)
TREE_TYPE (rhs2_type))
&& multiple_p (TYPE_VECTOR_SUBPARTS (rhs1_type),
TYPE_VECTOR_SUBPARTS (rhs2_type))
- && multiple_of_p (bitsizetype, rhs3, TYPE_SIZE (rhs2_type)))))
+ && multiple_p (wi::to_poly_offset (rhs3),
+ wi::to_poly_offset (TYPE_SIZE (rhs2_type))))))
{
error ("not allowed type combination in %qs", code_name);
debug_generic_expr (rhs1_type);