From adf42c90252cbcea388dd45d5f840a5459d9446d Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Sun, 22 May 2005 15:17:35 +0000 Subject: [PATCH] bugfix and additional case for optimization. May we skip casts when checking for exception after alloc? I think so. [r5868] --- ir/opt/ldstopt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index 663ff5fd3..5bf3c9442 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -381,7 +381,8 @@ static int optimize_load(ir_node *load) } } } - else if (get_irn_op(ptr) == op_Alloc) { + else if ((get_irn_op(skip_Proj(ptr)) == op_Alloc) || + ((get_irn_op(ptr) == op_Cast) && (get_irn_op(skip_Proj(get_Cast_op(ptr))) == op_Alloc))) { /* simple case: a direct load after an Alloc. Firm Alloc throw * an exception in case of out-of-memory. So, there is no way for an * exception in this load. -- 2.20.1