aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--simplify.c3
-rw-r--r--validation/optim/trunc-trunc.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/simplify.c b/simplify.c
index f8caa351..0fcc7c25 100644
--- a/simplify.c
+++ b/simplify.c
@@ -1293,6 +1293,9 @@ static int simplify_cast(struct instruction *insn)
break;
case OP_TRUNC:
switch (insn->opcode) {
+ case OP_TRUNC:
+ insn->orig_type = def->orig_type;
+ return replace_pseudo(insn, &insn->src1, def->src);
case OP_ZEXT:
if (size != def->orig_type->bit_size)
break;
diff --git a/validation/optim/trunc-trunc.c b/validation/optim/trunc-trunc.c
index c01d81f6..6dc50aee 100644
--- a/validation/optim/trunc-trunc.c
+++ b/validation/optim/trunc-trunc.c
@@ -6,7 +6,6 @@ char foo(int a)
/*
* check-name: trunc-trunc
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-pattern(1): trunc\\.