[PATCH] D95227: [RISCV] Simplify BP initialisation
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 18:11:24 PST 2021
StephenFan updated this revision to Diff 318889.
StephenFan added a comment.
Address craig.topper's comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95227/new/
https://reviews.llvm.org/D95227
Files:
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Index: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -483,9 +483,7 @@
// track the current stack after allocating variable sized objects.
if (hasBP(MF)) {
// move BP, SP
- BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), BPReg)
- .addReg(SPReg)
- .addImm(0);
+ TII->copyPhysReg(MBB, MBBI, DL, BPReg, SPReg, false);
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95227.318889.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/d9a5877b/attachment.bin>
More information about the llvm-commits
mailing list