[llvm] promote Pseduo Opcode from 32bit to 64bits after eliminating the `extsw` instruction in PPCMIPeepholes optimization (PR #85451)

Kamau Bridgeman via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 12:10:48 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);
----------------
kamaub wrote:

Should we refactor this to "BeforeElim" since we technically promote the src instruction before eliminating the extension.

https://github.com/llvm/llvm-project/pull/85451


More information about the llvm-commits mailing list