You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VectorCombine::foldInsExtVectorToShuffle fold insert (DstVec, (extract SrcVec, ExtIdx), InsIdx) --> shuffle (DstVec, SrcVec, Mask) is limited to cases where the DstVec/SrcVec are the same vector type, but it might still be cost beneficial to fold these for non matching shuffles assuming any shuffle narrowing/widening for SrcVec is cheap enough.
define <4 x double> @ins0_v4f64_ext1_v2f64(<4 x double> %a, <2 x double> %b) {
%ext = extractelement <2 x double> %b, i321%ins = insertelement <4 x double> %a, double%ext, i320ret <4 x double> %ins
}
define <2 x double> @ins1_v2f64_ext1_v4f64(<2 x double> %a, <4 x double> %b) {
%ext = extractelement <4 x double> %b, i321%ins = insertelement <2 x double> %a, double%ext, i321ret <2 x double> %ins
}
InstCombine will handle some 'easy' cases, but ideally we need VectorCombine to handle this more generally as a cost driven combine.