some simple special cases via VEC_[UN]PACK[_FLOAT]_LO_EXPR. */
optab optab;
tree halfvectype, dblvectype;
+ enum tree_code unpack_op;
+
+ if (!BYTES_BIG_ENDIAN)
+ unpack_op = (FLOAT_TYPE_P (TREE_TYPE (type))
+ ? VEC_UNPACK_FLOAT_LO_EXPR
+ : VEC_UNPACK_LO_EXPR);
+ else
+ unpack_op = (FLOAT_TYPE_P (TREE_TYPE (type))
+ ? VEC_UNPACK_FLOAT_HI_EXPR
+ : VEC_UNPACK_HI_EXPR);
+
if (CONVERT_EXPR_CODE_P (conv_code)
&& (2 * TYPE_PRECISION (TREE_TYPE (TREE_TYPE (orig[0])))
== TYPE_PRECISION (TREE_TYPE (type)))
represented as scalar bitmasks. See PR95528. */
&& (VECTOR_MODE_P (TYPE_MODE (dblvectype))
|| VECTOR_BOOLEAN_TYPE_P (dblvectype))
- && (optab = optab_for_tree_code (FLOAT_TYPE_P (TREE_TYPE (type))
- ? VEC_UNPACK_FLOAT_LO_EXPR
- : VEC_UNPACK_LO_EXPR,
+ && (optab = optab_for_tree_code (unpack_op,
dblvectype,
optab_default))
&& (optab_handler (optab, TYPE_MODE (dblvectype))
orig[0], TYPE_SIZE (dblvectype),
bitsize_zero_node);
gsi_insert_seq_before (gsi, stmts, GSI_SAME_STMT);
- gimple_assign_set_rhs_with_ops (gsi,
- FLOAT_TYPE_P (TREE_TYPE (type))
- ? VEC_UNPACK_FLOAT_LO_EXPR
- : VEC_UNPACK_LO_EXPR,
- dbl);
+ gimple_assign_set_rhs_with_ops (gsi, unpack_op, dbl);
}
else if (CONVERT_EXPR_CODE_P (conv_code)
&& (TYPE_PRECISION (TREE_TYPE (TREE_TYPE (orig[0])))