This is done during type legalization since the target representation of
these nodes may not be valid until after type legalization, and after
type legalization the fact that these are dealing with i1 types may be
lost.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks good to me but with a couple of observations.
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | ||
---|---|---|
2273 | Perhaps this should be else if? Same goes for the next if block. | |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
169–171 ↗ | (On Diff #441698) | Are the _ins_ tests strictly necessary? It's not immediately obvious how they relate to your code changes. |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
---|---|---|
169–171 ↗ | (On Diff #441698) | The rest of the tests in these files cause a zero_extend to be generated, hence would be covered by the current way this was being done (in an add dagcombine), these _ins_ tests cause an any_extend to be generated, which is the reason why this functionality was moved to type legalisation, hence it seemed reasonable to test that case also (i.e. I want to avoid someone moving this back to something like an add dagcombine and thinking everything is fine). |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
---|---|---|
169–171 ↗ | (On Diff #441698) | Sounds reasonable. Thanks for the explanation. |
Perhaps this should be else if? Same goes for the next if block.