aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/simplify.c b/simplify.c
index 51c930fa..8d1ffb13 100644
--- a/simplify.c
+++ b/simplify.c
@@ -1079,6 +1079,12 @@ static int simplify_cast(struct instruction *insn)
}
break;
case OP_ZEXT:
+ switch (insn->opcode) {
+ case OP_ZEXT:
+ insn->orig_type = def->orig_type;
+ return replace_pseudo(insn, &insn->src, def->src);
+ }
+ /* fall through */
case OP_SEXT:
switch (insn->opcode) {
case OP_TRUNC: