diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-03-07 09:04:38 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-03-07 09:04:38 +0100 |
commit | cd5c0aeeae00f5e093715127fe2fb6b6cb98a260 (patch) | |
tree | 5c0a6264e9bcf6fb5da8b83c4d77cd086033575d /gcc | |
parent | 1f6dba54da4c437e74fbb1c92621adb33582efff (diff) | |
download | gcc-cd5c0aeeae00f5e093715127fe2fb6b6cb98a260.zip gcc-cd5c0aeeae00f5e093715127fe2fb6b6cb98a260.tar.gz gcc-cd5c0aeeae00f5e093715127fe2fb6b6cb98a260.tar.bz2 |
re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
PR rtl-optimization/79901
* expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
min/max expander, expand it using expand_vec_cond_expr.
From-SVN: r245946
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/expr.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb06b5a..efeee1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2017-03-07 Jakub Jelinek <jakub@redhat.com> + PR rtl-optimization/79901 + * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no + min/max expander, expand it using expand_vec_cond_expr. + PR sanitizer/79897 * ubsan.c (ubsan_encode_value): Call mark_addressable on the temporary. @@ -8943,6 +8943,18 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, if (temp != 0) return temp; + /* For vector MIN <x, y>, expand it a VEC_COND_EXPR <x <= y, x, y> + and similarly for MAX <x, y>. */ + if (VECTOR_TYPE_P (type)) + { + tree t0 = make_tree (type, op0); + tree t1 = make_tree (type, op1); + tree comparison = build2 (code == MIN_EXPR ? LE_EXPR : GE_EXPR, + type, t0, t1); + return expand_vec_cond_expr (type, comparison, t0, t1, + original_target); + } + /* At this point, a MEM target is no longer useful; we will get better code without it. */ |