From 2e5371b38ec7c3cffb5ce9d9dea9f6cdb675b1b1 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 24 Nov 2012 23:17:18 +0100 Subject: [PATCH] bearch: Assert, instead of test, that the register requirement is not arch_register_req_type_none in arch_reg_is_allocatable(). If it is, something is very wrong. --- ir/be/bearch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ir/be/bearch.c b/ir/be/bearch.c index 1e3bc2bb1..75681c05b 100644 --- a/ir/be/bearch.c +++ b/ir/be/bearch.c @@ -221,10 +221,9 @@ void arch_add_irn_flags(ir_node *node, arch_irn_flags_t flags) bool arch_reg_is_allocatable(const arch_register_req_t *req, const arch_register_t *reg) { + assert(req->type != arch_register_req_type_none); if (reg->type & arch_register_type_joker) return true; - if (req->type == arch_register_req_type_none) - return false; if (req->type & arch_register_req_type_limited) { if (reg->reg_class != req->cls) return false; -- 2.20.1