Size queries for MVTs, split out from D53137.
Contains a fix for FindMemType to avoid using scalable vector types to contain non-scalable types.
Paths
| Differential D66871
[SVE] MVT scalable size queries ClosedPublic Authored by huntergr on Aug 28 2019, 4:15 AM.
Details Summary Size queries for MVTs, split out from D53137. Contains a fix for FindMemType to avoid using scalable vector types to contain non-scalable types.
Diff Detail
Event TimelineComment Actions LGTM
This revision is now accepted and ready to land.Aug 28 2019, 7:41 AM Comment Actions
Thanks for the review; there's still D53137 and D66339 as prerequisites so I won't commit this yet.
Comment Actions
Herald added subscribers: jsji, atanasyan, jrtc27 and 4 others. · View Herald TranscriptOct 25 2019, 4:50 AM rovka added inline comments.
Comment Actions
Comment Actions I also changed the SelectionDAGBuilder code for masked loads/stores/gathers/scatters to use the known min size when creating a MachineMemoryOperand, since MMO isn't aware of scalable types yet. I've left TODOs as reminders.
Comment Actions Regarding the change to return const, I'm not convinced that's a good idea (we actually have a clang-tidy check that warns about that). I think it would be better to either name those temporaries or use std::make_tuple instead of std::tie (whichever you prefer).
Comment Actions
Comment Actions I don't see anything else wrong with this. LGTM if you rename the LE predicate.
Closed by commit rG3f08ad611aa2: [SVE][CodeGen] Scalable vector MVT size queries (authored by huntergr). · Explain WhyNov 18 2019, 4:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 226410 llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/include/llvm/CodeGen/ValueTypes.h
llvm/include/llvm/Support/MachineValueType.h
llvm/include/llvm/Support/TypeSize.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/ValueTypes.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64StackOffset.h
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
|
Nit-picky: would it make sense to add an explicit !scalable assert to all these functions?
I see that this particular function is guarded by the asserts in getSizeInBits() and getExtendedSizeInBits(), but there's really no guarantee that future modifications will preserve this behavior.
To be clear, I don't feel strongly about this. Just thinking aloud...