summaryrefslogtreecommitdiffhomepage
path: root/ir/be
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-24 08:14:07 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-24 08:14:07 +0100
commit6058dbb9789dbd6952089b73fd2ec086936461b0 (patch)
tree0bb3c430129591b255863d7329a2b343158ed624 /ir/be
parentf6e223b6d1711cc4e58d0248f5b22a3d5cc79fd2 (diff)
Use MAX.
Diffstat (limited to 'ir/be')
-rw-r--r--ir/be/bespilldaemel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ir/be/bespilldaemel.c b/ir/be/bespilldaemel.c
index c872f09..2b68f5e 100644
--- a/ir/be/bespilldaemel.c
+++ b/ir/be/bespilldaemel.c
@@ -145,8 +145,7 @@ static void do_spilling(ir_nodeset_t *live_nodes, ir_node *node)
/* we can reuse all reloaded values for the defined values, but we might
* need even more registers */
- if (values_defined > free_regs_needed)
- free_regs_needed = values_defined;
+ free_regs_needed = MAX(free_regs_needed, values_defined);
size_t n_live_nodes = ir_nodeset_size(live_nodes);
int spills_needed = (n_live_nodes + free_regs_needed) - n_regs;