operands[1], operands[2], <VM>mode);
DONE;
})
+
+(define_expand "movmisalign<mode>"
+ [(set (match_operand:V 0 "nonimmediate_operand")
+ (match_operand:V 1 "general_operand"))]
+ "TARGET_VECTOR"
+ {
+ /* Equivalent to a normal move for our purpooses. */
+ emit_move_insn (operands[0], operands[1]);
+ DONE;
+ }
+)
rtx gen_avl_for_scalar_move (rtx);
void expand_tuple_move (machine_mode, rtx *);
machine_mode preferred_simd_mode (scalar_mode);
-extern bool riscv_vector_mask_mode_p (machine_mode);
-extern opt_machine_mode riscv_vector_get_mask_mode (machine_mode mode);
-extern rtx get_mask_policy_no_pred (void);
-extern rtx get_tail_policy_no_pred (void);
+opt_machine_mode get_mask_mode (machine_mode);
}
/* We classify builtin types into two classes:
#include "expr.h"
#include "optabs.h"
#include "tm-constrs.h"
-#include "riscv-vector-builtins.h"
#include "rtx-vector-builder.h"
#include "targhooks.h"
return gen_int_mode (type, Pmode);
}
-/* Return the mask policy for no predication. */
-rtx
-get_mask_policy_no_pred (void)
-{
- return get_mask_policy_for_pred (PRED_TYPE_none);
-}
-
-/* Return the tail policy for no predication. */
-rtx
-get_tail_policy_no_pred (void)
-{
- return get_tail_policy_for_pred (PRED_TYPE_none);
-}
-
-/* Return true if it is a RVV mask mode. */
-bool
-riscv_vector_mask_mode_p (machine_mode mode)
-{
- return (mode == VNx1BImode || mode == VNx2BImode || mode == VNx4BImode
- || mode == VNx8BImode || mode == VNx16BImode || mode == VNx32BImode
- || mode == VNx64BImode);
-}
-
/* Return the appropriate mask mode for MODE. */
opt_machine_mode
-riscv_vector_get_mask_mode (machine_mode mode)
+get_mask_mode (machine_mode mode)
{
- machine_mode mask_mode;
- int nf = 1;
-
- FOR_EACH_MODE_IN_CLASS (mask_mode, MODE_VECTOR_BOOL)
- if (GET_MODE_INNER (mask_mode) == BImode
- && known_eq (GET_MODE_NUNITS (mask_mode) * nf, GET_MODE_NUNITS (mode))
- && riscv_vector_mask_mode_p (mask_mode))
- return mask_mode;
- return default_get_mask_mode (mode);
+ return get_vector_mode (BImode, GET_MODE_NUNITS (mode));
}
/* Return the RVV vector mode that has NUNITS elements of mode INNER_MODE.
/* Get TAIL policy for predication. If predication indicates TU, return the TU.
Otherwise, return the prefer default configuration. */
-rtx
+static rtx
get_tail_policy_for_pred (enum predication_type_index pred)
{
if (pred == PRED_TYPE_tu || pred == PRED_TYPE_tum || pred == PRED_TYPE_tumu)
/* Get MASK policy for predication. If predication indicates MU, return the MU.
Otherwise, return the prefer default configuration. */
-rtx
+static rtx
get_mask_policy_for_pred (enum predication_type_index pred)
{
if (pred == PRED_TYPE_tumu || pred == PRED_TYPE_mu)
extern function_instance get_read_vl_instance (void);
extern tree get_read_vl_decl (void);
-extern rtx get_tail_policy_for_pred (enum predication_type_index pred);
-extern rtx get_mask_policy_for_pred (enum predication_type_index pred);
-
inline tree
rvv_arg_type_info::get_scalar_type (vector_type_index type_idx) const
{
riscv_get_mask_mode (machine_mode mode)
{
machine_mode mask_mode = VOIDmode;
- if (TARGET_VECTOR
- && riscv_vector::riscv_vector_get_mask_mode (mode).exists (&mask_mode))
+ if (TARGET_VECTOR && riscv_vector::get_mask_mode (mode).exists (&mask_mode))
return mask_mode;
return default_get_mask_mode (mode);
asm volatile ("nop"
: "=vr" (v0), "=vr" (v8), "=vr" (v16), "=vr" (v24)
:
- 😄;
+ :);
asm volatile ("nop"
:
: "vr" (v0), "vr" (v8), "vr" (v16), "vr" (v24)
- 😄;
+ :);
*(vuint8m1_t *)base = data;
char* pStr = (char*)__builtin_alloca(y);
f(pStr);