[llvm-branch-commits] [llvm] [LoongArch] Load suitable immediates with LU12I.W+SLLI.D (PR #242357)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Nov 13 08:54:54 PST 2026
================
@@ -361,9 +364,10 @@ bool LoongArchMergeBaseOffsetOpt::foldLargeOffset(
SmallVector<MachineInstr *, 4> Instrs;
int64_t Offset = 0;
int64_t Mask = -1;
+ int Shift = 0;
- // This can point to one of [ORI, LU12I.W, LU32I.D, LU52I.D]:
- for (int i = 0; i < 4; i++) {
+ // This can point to one of [ORI, LU12I.W, LU32I.D, LU52I.D, SLLI.D]:
+ for (int i = 0; i < 5; i++) {
----------------
heiher wrote:
```suggestion
for (int i = 0; i < 4; i++) {
```
It's max depth of chain.
https://github.com/llvm/llvm-project/pull/242357
More information about the llvm-branch-commits
mailing list