[llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 00:25:39 PDT 2024
- Previous message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Next message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
topperc wrote:
> I'm think about introducing `ISD::GetElementPtr` just like `TargetOpcode::G_PTR_ADD`. Would that be more generic?
What's the motivation for that?
I don't know if that's more generic. G_PTR_ADD only takes two operands, a pointer and an offset. A GEP with two indices can be lowered to a G_PTR_ADD+SHL for each index or one G_PTR_ADD with ADDs and SHLs to calculate the offset. And there are a couple ways to calculate the offset.
https://github.com/llvm/llvm-project/pull/85734
- Previous message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Next message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list