From a48497601e1f4cdaeccdf22e1a181f9a962c9ea1 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 1 Aug 2007 18:07:45 +0000 Subject: [PATCH] fix bad mode in a%a optimisation [r15422] --- ir/ir/iropt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index cf8bc867c..a1f88c605 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -2269,7 +2269,7 @@ static ir_node *transform_node_Mod(ir_node *n) { ir_node *a = get_Mod_left(n); ir_node *b = get_Mod_right(n); ir_node *dummy; - ir_mode *mode = get_irn_mode(n); + ir_mode *mode = get_Mod_resmode(n); if (a == b && value_not_zero(a, &dummy)) { /* BEWARE: we can optimize a%a to 0 only if this cannot cause a exception */ -- 2.20.1