diff mbox series

[07/13] postreload-gcse: no insert on mere lookup

Message ID orbknpfp8w.fsf@lxoliva.fsfla.org
State New
Headers show
Series [01/13] scoped tables: insert before further lookups | expand

Commit Message

Alexandre Oliva Dec. 27, 2022, 4:24 a.m. UTC
lookup_expr_in_table is not used for insertions, but it mistakenly
used INSERT rather than NO_INSERT.

Regstrapped on x86_64-linux-gnu.  Ok to install?


for  gcc/ChangeLog

	* postreload-gcse.cc (lookup_expr_in_table): Use NO_INSERT.
---
 gcc/postreload-gcse.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law Dec. 27, 2022, 3:11 p.m. UTC | #1
On 12/26/22 21:24, Alexandre Oliva via Gcc-patches wrote:
> 
> lookup_expr_in_table is not used for insertions, but it mistakenly
> used INSERT rather than NO_INSERT.
> 
> Regstrapped on x86_64-linux-gnu.  Ok to install?
> 
> 
> for  gcc/ChangeLog
> 
> 	* postreload-gcse.cc (lookup_expr_in_table): Use NO_INSERT.
OK
jeff
diff mbox series

Patch

diff --git a/gcc/postreload-gcse.cc b/gcc/postreload-gcse.cc
index 1c795b43ca36b..2818f54dedd29 100644
--- a/gcc/postreload-gcse.cc
+++ b/gcc/postreload-gcse.cc
@@ -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)