summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beverify.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-02-13 20:23:04 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-02-13 20:46:15 +0100
commit625cbbb10475851382a278ba7e2a74f63c6ce66f (patch)
treeb5054f60ea2c89fddc04cf43af1302b34fe3ea27 /ir/be/beverify.c
parentb0a9ca6a6dd587a4c2492020d37619322f8f9928 (diff)
be: Check that the register class of an input and its operand match.
Diffstat (limited to 'ir/be/beverify.c')
-rw-r--r--ir/be/beverify.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ir/be/beverify.c b/ir/be/beverify.c
index 378a3e3..5aef6da 100644
--- a/ir/be/beverify.c
+++ b/ir/be/beverify.c
@@ -593,11 +593,16 @@ static void check_input_constraints(be_verify_reg_alloc_env_t *const env, ir_nod
continue;
}
- const arch_register_req_t *req = arch_get_irn_register_req_in(node, i);
+ const arch_register_req_t *req = arch_get_irn_register_req_in(node, i);
+ const arch_register_req_t *pred_req = arch_get_irn_register_req(pred);
+ if (req->cls != pred_req->cls) {
+ verify_warnf(node, "%+F register class of requirement at input %d and operand differ", node, i);
+ env->problem_found = true;
+ }
+
if (req->cls == NULL)
continue;
- const arch_register_req_t *pred_req = arch_get_irn_register_req(pred);
if (req->width > pred_req->width) {
verify_warnf(node, "%+F register width of value at input %d too small", node, i);
env->problem_found = true;