https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110897
--- Comment #11 from JuzheZhong <juzhe.zhong at rivai dot ai> --- I debug vectorizable_shift: Breakpoint 1, vectorizable_shift (vinfo=0x3fb45d0, stmt_info=0x3fb5ea0, gsi=0x0, vec_stmt=0x0, slp_node=0x0, cost_vec=0x7fffffffc648) at ../../../riscv-gcc/gcc/tree-vect-stmts.cc:6028 6028 scalar_dest = gimple_assign_lhs (stmt); (gdb) n 6029 vectype_out = STMT_VINFO_VECTYPE (stmt_info); (gdb) p scalar_dest->typed.type->type_common.mode $7 = E_HImode (gdb) call print_gimple_stmts(stdout,stmt,0,0) No symbol "print_gimple_stmts" in current context. (gdb) call print_gimple_stmt(stdout,stmt,0,0) patt_33 = _4 >> patt_34; It's odd here, we are supposed to vectorize this following codes in ifcvt dump: _5 = (int) _4; _8 = (int) _7; _9 = _5 >> _8; You can see "_9 = _5 >> _8;". We should vectorize SImode instead of HImode. The correct follow should be first extend HI -> SImode, Then vectorize logical shift right for SImode, and finally truncate SImode to HImode. Am I right? When I debug tree-vect-stmts.cc, the vectorization follow doesn't work as we want ? Thanks.