Currently scalable and fixed stores are combined, but only loads of
scalable vectors are combined for now.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
11330 | How have we guaranteed the load has an MVT type? | |
11333 | This isn't enough to guarantee the type is legal. DAG combine has to be very careful with types. | |
11339 | I think we need to check isNormalLoad for the load to make sure it isn't an extending or indexed load. Probably a good idea to check isSimple too. Especially since you aren't checking that this is the only use of the load. Same applies for stores |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
11296 | I don't think check simple is enough. You need to check isTypeLegal. |
Trying to do this as a combine is tricky, as we need to somehow combine it before the vector_interleave/vector_deinterleave ops are legalised, but after the types are legalised. I'm going to rework this to use the lowerInterleaveIntrinsicToStore/lowerDeinterleaveIntrinsicToLoad target lowering hooks introduced in D146218 instead.
I don't think check simple is enough. You need to check isTypeLegal.