Yes. It does sufficient. Send a patch:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642216.html
juzhe.zh...@rivai.ai
From: Robin Dapp
Date: 2024-01-09 00:45
To: 钟居哲; gcc-patches
CC: rdapp.gcc; kito.cheng; kito.cheng; Jeff Law
Subject: Re: [PATCH] RISC-V: Teach liveness computation
> > + if (is_gimple_min_invariant (op))
> > + return true;
> > + if (SSA_NAME_IS_DEFAULT_DEF (op)
> > + || !flow_bb_inside_loop_p (loop, gimple_bb (SSA_NAME_DEF_STMT
> (op
> > + return true;
> > + return gimple_uid (SSA_NAME_DEF_STMT (op)) & 1;
> > +}
Thanks Robin.
is_gimple_constant makes more senes. Committed with addressing your comments.
juzhe.zh...@rivai.ai
From: Robin Dapp
Date: 2024-01-05 17:54
To: Juzhe-Zhong; gcc-patches
CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw
Subject: Re: [PATCH] RISC-V: Teach liveness computation
> 1). We not only have vashl_optab,vashr_optab,vlshr_optab which vectorize
> shift with vector shift amount,
> that is, vectorization of 'a[i] >> x[i]', the shift amount is loop variant.
> 2). But also, we have ashl_optab, ashr_optab, lshr_optab which can vectorize
> shift with scalar shift amoun
1). We not only have vashl_optab,vashr_optab,vlshr_optab which vectorize shift
with vector shift amount,
that is, vectorization of 'a[i] >> x[i]', the shift amount is loop variant.
2). But also, we have ashl_optab, ashr_optab, lshr_optab which can vectorize
shift with scalar shift amount,
that is