Hello Jakub, On 08 мая 17:29, Jakub Jelinek wrote: > Hi! > > The following patch adds folding for vector shift by scalar builtins. > If they are masked, so far we only optimize them only if the mask is all > ones. ix86_fold_builtin handles the all constant argument cases, where the > effect of the instructions can be fully precomputed at compile time and can > be useful even in constant expressions etc. > The ix86_gimple_fold_builtin deals with the cases where the first argument > is an arbitrary vector, but we can still optimize the cases: > 1) if the shift count is 0, just return the first argument directly > 2) if the shift count is equal or higher than element precision and the > shift is not arithmetic right shift, the result is 0 > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Your patch is OK for trunk.
-- Thanks, K