aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--simplify.c4
-rw-r--r--validation/optim/fpcast-constant.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/simplify.c b/simplify.c
index be720860..ccf0a5f5 100644
--- a/simplify.c
+++ b/simplify.c
@@ -955,8 +955,8 @@ static int simplify_cast(struct instruction *insn)
if (is_ptr_type(orig_type) || is_ptr_type(insn->type))
return 0;
- /* Keep float-to-int casts */
- if (is_float_type(orig_type) && !is_float_type(insn->type))
+ /* Keep float-to-int and int-to-float casts */
+ if (is_float_type(orig_type) != is_float_type(insn->type))
return 0;
orig_size = orig_type->bit_size;
diff --git a/validation/optim/fpcast-constant.c b/validation/optim/fpcast-constant.c
index 47feffe5..c0f906b3 100644
--- a/validation/optim/fpcast-constant.c
+++ b/validation/optim/fpcast-constant.c
@@ -6,7 +6,6 @@ static double foo(double a, int p)
/*
* check-name: fpcast-constant
* check-command: test-linearize $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-contains: fpcast\\.