postreload-gcse: no insert on mere lookup
authorAlexandre Oliva <oliva@adacore.com>
Thu, 29 Dec 2022 17:32:56 +0000 (14:32 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 29 Dec 2022 17:39:47 +0000 (14:39 -0300)
lookup_expr_in_table is not used for insertions, but it mistakenly
used INSERT rather than NO_INSERT.

for  gcc/ChangeLog

* postreload-gcse.cc (lookup_expr_in_table): Use NO_INSERT.

gcc/postreload-gcse.cc

index 1c795b4..2818f54 100644 (file)
@@ -447,7 +447,7 @@ lookup_expr_in_table (rtx pat)
   tmp_expr->hash = hash;
   tmp_expr->avail_occr = NULL;
 
-  slot = expr_table->find_slot_with_hash (tmp_expr, hash, INSERT);
+  slot = expr_table->find_slot_with_hash (tmp_expr, hash, NO_INSERT);
   obstack_free (&expr_obstack, tmp_expr);
 
   if (!slot)