Commit 21aaaf1e by Bin Cheng Committed by Bin Cheng

match.pd: Refine type conversion in result expr for below pattern: (cond (cmp (convert1?

	* match.pd: Refine type conversion in result expr for below pattern:
	(cond (cmp (convert1? x) c1) (convert2? x) c2) -> (minmax (x c)).

From-SVN: r242831
parent 3b08cde8
2016-11-24 Bin Cheng <bin.cheng@arm.com>
* match.pd: Refine type conversion in result expr for below pattern:
(cond (cmp (convert1? x) c1) (convert2? x) c2) -> (minmax (x c)).
2016-11-24 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/78429
......@@ -2022,11 +2022,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
}
}
(if (code == MAX_EXPR)
(convert (max @1 (convert:from_type @2)))
(convert (max @1 (convert @2)))
(if (code == MIN_EXPR)
(convert (min @1 (convert:from_type @2)))
(convert (min @1 (convert @2)))
(if (code == EQ_EXPR)
(cond (cmp @1 (convert:from_type @3)) (convert:from_type @3) @2)))))))
(convert (cond (cmp @1 (convert @3))
(convert:from_type @3) (convert:from_type @2)))))))))
(for cnd (cond vec_cond)
/* A ? B : (A ? X : C) -> A ? B : C. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment