In previous code, when refineIndexType(...) is called and Index is undef, Index.getOperand(0) will raise a assertion fail.
Hi, thanks for comments. I can't change into <4 x float>.
I could change to <24 x float> because The smallest type to reproduce this bug is <24 x float>.
In the case of "<24 x float>", the scattered index is represented by a buildvector of<24 x i64> .
During LegalizeType procedure, The scattered index, aka, a buildvector of<24 x i64>will be widened into buildvector (<32 x i64>) whose last 8 elements are undef.
Then, <32 x i64> is split into two buildvectors(16 x i64) , one of which carries 8 undef.
Then, <16 x i64> is split into two buildvectors(8 x i64), one of which carries 8 undef, which means this buildvector will become a v8i64 undef(That's the masked.scatter's index which cause assertion fail).