diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-13 20:07:01 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-13 20:07:01 +0000 |
commit | 346dc3449dca9b7369b6bc548fb572c72377b36f (patch) | |
tree | b51ff1980c56c199511e2a406274c144de43fd81 /gcc/optabs.c | |
parent | caa36f1c53396b91841cf73c89bc2f91ee5d2941 (diff) | |
download | gcc-346dc3449dca9b7369b6bc548fb572c72377b36f.tar.gz |
Revert two unintended commits
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182301 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 1c13b5a660f..0d5cd73c3a2 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -553,6 +553,12 @@ optab_for_tree_code (enum tree_code code, const_tree type, case VEC_EXTRACT_ODD_EXPR: return vec_extract_odd_optab; + case VEC_INTERLEAVE_HIGH_EXPR: + return vec_interleave_high_optab; + + case VEC_INTERLEAVE_LOW_EXPR: + return vec_interleave_low_optab; + default: return NULL; } @@ -1606,7 +1612,11 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, enum tree_code tcode = ERROR_MARK; rtx sel; - if (binoptab == vec_extract_even_optab) + if (binoptab == vec_interleave_high_optab) + tcode = VEC_INTERLEAVE_HIGH_EXPR; + else if (binoptab == vec_interleave_low_optab) + tcode = VEC_INTERLEAVE_LOW_EXPR; + else if (binoptab == vec_extract_even_optab) tcode = VEC_EXTRACT_EVEN_EXPR; else if (binoptab == vec_extract_odd_optab) tcode = VEC_EXTRACT_ODD_EXPR; @@ -6261,6 +6271,8 @@ init_optabs (void) init_optab (vec_extract_optab, UNKNOWN); init_optab (vec_extract_even_optab, UNKNOWN); init_optab (vec_extract_odd_optab, UNKNOWN); + init_optab (vec_interleave_high_optab, UNKNOWN); + init_optab (vec_interleave_low_optab, UNKNOWN); init_optab (vec_set_optab, UNKNOWN); init_optab (vec_init_optab, UNKNOWN); init_optab (vec_shl_optab, UNKNOWN); @@ -6868,7 +6880,8 @@ can_vec_perm_p (enum machine_mode mode, bool variable, return true; } -/* Return true if we can implement with VEC_PERM_EXPR for this target. +/* Return true if we can implement VEC_INTERLEAVE_{HIGH,LOW}_EXPR or + VEC_EXTRACT_{EVEN,ODD}_EXPR with VEC_PERM_EXPR for this target. If PSEL is non-null, return the selector for the permutation. */ bool @@ -6918,6 +6931,17 @@ can_vec_perm_for_code_p (enum tree_code code, enum machine_mode mode, data[i] = i * 2 + alt; break; + case VEC_INTERLEAVE_HIGH_EXPR: + case VEC_INTERLEAVE_LOW_EXPR: + if ((BYTES_BIG_ENDIAN != 0) ^ (code == VEC_INTERLEAVE_HIGH_EXPR)) + alt = nelt / 2; + for (i = 0; i < nelt / 2; ++i) + { + data[i * 2] = i + alt; + data[i * 2 + 1] = i + nelt + alt; + } + break; + default: gcc_unreachable (); } |