On 2/27/24 21:51, Li, Pan2 wrote:
Well, the code tries to turn the vector mode into a suitable integer mode via int_mode_for_mode. That takes a mode, including vector modes and tries to find an integer mode of the exact same size.if (!targetm.modes_tieable_p (src_int_mode, src_mode)) return NULL_RTX; if (!targetm.modes_tieable_p (int_mode, mode)) return NULL_RTX;Yes, will return NULL_RTX for in the first if, given src_int_mode is E_DImode while src_mode is E_V2SFmode and mode is E_V4QImode. The extract_low_bits convert the modes E_V2SFmode/E_V4QImode to E_DImode/E_SImode in advance before tieable checking, validate_subreg and gen_lowpart. Not sure if my understanding is correct but looks extract_low_bits cannot take care of vector modes up to a point because vector modes are always untieable to its' int mode, and then return NULL_RTX.
So it's going to check if V2SF can be tied to DI and V4QI with SI. I suspect those are going to fail for RISC-V as those aren't tieable.
Jeff
