aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--simplify.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/simplify.c b/simplify.c
index d316367d..fc148124 100644
--- a/simplify.c
+++ b/simplify.c
@@ -542,14 +542,16 @@ undef:
static int simplify_asr(struct instruction *insn, pseudo_t pseudo, long long value)
{
- unsigned int size = operand_size(insn, pseudo);
+ unsigned int size;
+ if (!value)
+ return replace_with_pseudo(insn, pseudo);
+
+ size = operand_size(insn, pseudo);
if (value >= size && !insn->tainted) {
warning(insn->pos, "right shift by bigger than source value");
insn->tainted = 1;
}
- if (!value)
- return replace_with_pseudo(insn, pseudo);
return 0;
}