vp.reduce.or currently generates a TU vsetvli because we need to send a tied operand for vd to support vl=0 but we don’t have any way to indictate that we only care about element 0.
To fix this we need to provide a policy operand to the reduction pseudoinstructions. The isel patterns for intrinsics can set the policy to tail undisturbed.
All of these RISCVISD opcodes will need to have a policy operand added wherever they are created.
VECREDUCE_ADD_VL, VECREDUCE_UMAX_VL, VECREDUCE_SMAX_VL, VECREDUCE_UMIN_VL, VECREDUCE_SMIN_VL, VECREDUCE_AND_VL, VECREDUCE_OR_VL, VECREDUCE_XOR_VL, VECREDUCE_FADD_VL, VECREDUCE_SEQ_FADD_VL, VECREDUCE_FMIN_VL, VECREDUCE_FMAX_VL,
Remove the 6 from the brackets. Let the compiler autodetect the size.