Add unpredicated ld1/st1 patterns for reg+reg addressing modes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
- Remove LICM vscale intrinsic changes
- Update tests to disable LSR to check vscale folding.
| llvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll | ||
|---|---|---|
| 141–156 | These tests look more complex than necessary for the ISel patterns they're exercising. Is something akin to the following not sufficient? define <vscale x 16 x i8> @ld1b_reg(i8* %base, i64 %off) {
%ptr = getelementptr inbounds i8, i8*%base, i64 %off
%ptrcast = bitcast i8* %ptr to <vscale x 16 x i8>*
%val = load <vscale x 16 x i8>, <vscale x 16 x i8>* %ptrcast
ret %val | |
| llvm/test/CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll | ||
| 169 | Same comment as for the loads. | |
| llvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll | ||
|---|---|---|
| 141–156 | Yep, it is. This is somewhat of a hang-up from when I was messing with vscale in LICM. | |
Sorry I didn't mention this as part of my previous review but there should really be a test for each isel pattern. These do exist for the imm variants, it is just they were added to spillfill-sve.ll instead of sve-ld1-addressing-mode-reg-imm.ll. Given the name of the existing test file and the quantity of the new tests perhaps it is worth creating sve-ld1-addressing-mode-reg-reg.ll?
These tests look more complex than necessary for the ISel patterns they're exercising. Is something akin to the following not sufficient?
define <vscale x 16 x i8> @ld1b_reg(i8* %base, i64 %off) { %ptr = getelementptr inbounds i8, i8*%base, i64 %off %ptrcast = bitcast i8* %ptr to <vscale x 16 x i8>* %val = load <vscale x 16 x i8>, <vscale x 16 x i8>* %ptrcast ret %val