In previous code, when refineIndexType(...) is called and Index is undef, Index.getOperand(0) will raise a assertion fail.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for finding and fixing this!
Can the test be simplified by using <4 x float> instead of <48 x float>?
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
9416 | Probably better to explicitly check if Index is not a zero/sign extend, instead of checking whether it has any operands. |
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).
Any thoughts?
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
9423 | How about just use Index = Index.getOperand(0) |
clang-format not found in user's PATH; not linting file.