The lowering code did not use the scale operand of MGATHER/MSCATTER
nodes, but instead assumed scaled indices were always scaled based
on the element type of the memory type. This patch adds the missing
support by rewritting the nodes as unscaled variants.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Rebased so this is now the base of a miniseries and thus contains a little more refactoring than before.
This looks like a nice couple of fixes @paulwalker-arm, thanks! I had a couple of minor comments ...
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
4675 | Hi @paulwalker-arm, you're introducing an implicit TypeSize->uint64_t cast here. Could you either:
| |
4791 | This code looks almost identical to the code in LowerMGATHER, except one creates a masked gather at the end and the other creates a masked scatter. Is it worth commonising at least part of this code? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
4675 | I've gone with option 2 as we will want this when removing other instances where we're relying on the implicit cast. | |
4791 | I guess it depends on how strongly you feel about this. It's the "almost" part that made me think commonising the code would make it less readable. The code itself is likely to shrink as well because I've got other patches in the works that will remove the need to modify IndexType so we're only talking about the couple of lines to create the shift and constant 1. |
Hi @paulwalker-arm, you're introducing an implicit TypeSize->uint64_t cast here. Could you either: