Use the exact addressing mode information instead of the default to
make better use of offsets in instructions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
---|---|---|
3181 | Isn't k*r+r entirely expressible with alsl in case of k in (2, 4, 8, 16 if LA64)? You may want to implement it this time, but I'm fine either way. |
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
---|---|---|
3181 | Hmm, I haven't dug any deeper but if this predicate only governs actions that end up with a ld/st then please ignore my comment. |
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
---|---|---|
3181 | Thank you for your review! As explained in https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/TargetLowering.h#L2600-L2607, this predicate only governs actions that end up with a load/store. |
LGTM with the nit addressed, thanks!
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
---|---|---|
3153–3155 | nit: "reg + 14-bit signed offset left-shifted by 2" could be a lot more concise. |
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
---|---|---|
3153–3155 | Thanks! I will modify it. |
nit: "reg + 14-bit signed offset left-shifted by 2" could be a lot more concise.