[llvm] promote Pseduo Opcode from 32bit to 64bits after eliminating the `extsw` instruction in PPCMIPeepholes optimization (PR #85451)
Amy Kwan via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 12:08:51 PDT 2024
================
@@ -1051,6 +1051,7 @@ bool PPCMIPeephole::simplifyCode() {
TII->isSignExtended(NarrowReg, MRI)) {
// We can eliminate EXTSW if the input is known to be already
// sign-extended.
+ TII->replaceInstrAfterElimExt32To64(NarrowReg, MRI, 0, LV);
----------------
amy-kwan wrote:
A couple comments regarding this line:
- This call does not make sense with the comment on 1052-1053. It would be better to put this call above the comment.
- The naming of the function seems unclear. We can consider renaming the function from `replaceInstrAfter` to `promoteInstrBefore`, or something similar.
- Add new documentation for the function.
https://github.com/llvm/llvm-project/pull/85451
More information about the llvm-commits
mailing list