This code seems untested and is likely obsolete, because this case
should already be handled by the code that legalizes the result type
of EXTRACT_SUBVECTOR.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm not sure we can write a test for RISCV either. This can only happen if the element type needs to be promoted on the larger vector type, but not the narrower vector type used for the result. I don't even know to exercise this code with fixed vectors. The llvm-cov bot says its untested http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp.html#L5001. Looks like it was added to support some case with mask vectors on X86, but that case no longer happens. Maybe we can just delete it?
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | ||
---|---|---|
5099 | The use of MVT instead of EVT here is also questionable. That's probably another vote for dropping it. |
Thanks, I wasn't aware of a code-coverage buildbot that actually showed this info, that's very useful. Is there a more friendly interface to get such a report? (Other than manually constructing the URL with a path to the file)
I've removed the function now and think it makes sense, because I can't think of any instance where the result type would be legal, and the (wider vector) input type requiring promotion.
There's an "llvm-cov" link in the left hand column on llvm.org that should take you to a list of all files.
I have reverted this patch in 7c68d4b8ff906ee97aa14c6ec97e19aaa766c08a as this code is still required for extracting fixed types from illegal scalable types on SVE, which is used for ACLE predicate types. We are lacking tests for this case, which I shall add.
The use of MVT instead of EVT here is also questionable. That's probably another vote for dropping it.