aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--simplify.c2
-rw-r--r--validation/optim/setne0-trunc.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/simplify.c b/simplify.c
index be8d461e..e399ad87 100644
--- a/simplify.c
+++ b/simplify.c
@@ -1196,11 +1196,13 @@ static int simplify_cast(struct instruction *insn)
break;
/* fall through */
case OP_ZEXT:
+ case OP_TRUNC:
// simplify:
// setcc.n %t <- %a, %b
// zext.m %r <- (n) %t
// into:
// setcc.m %r <- %a, %b
+ // and same for s/zext/trunc/
insn->opcode = def->opcode;
use_pseudo(insn, def->src2, &insn->src2);
return replace_pseudo(insn, &insn->src1, def->src1);
diff --git a/validation/optim/setne0-trunc.c b/validation/optim/setne0-trunc.c
index 62131410..6c5494ec 100644
--- a/validation/optim/setne0-trunc.c
+++ b/validation/optim/setne0-trunc.c
@@ -3,7 +3,6 @@ char foo(int a) { return a != 0; }
/*
* check-name: setne0-trunc
* check-command: test-linearize -m64 -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: trunc\\.