[llvm] [PowerPC] Remove non-existent operand of CP_COPY instruction (PR #153867)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 15:53:52 PDT 2025


================
@@ -2000,7 +2000,7 @@ def : Pat<(int_ppc_darnraw), (DARN 2)>;
 
 class X_RA5_RB5<bits<6> opcode, bits<10> xo, string opc, RegisterOperand ty,
                    InstrItinClass itin, list<dag> pattern>
-  : X_L1_RS5_RS5<opcode, xo, (outs), (ins ty:$RA, ty:$RB, u1imm:$L),
+  : X_L1_RS5_RS5<opcode, xo, (outs), (ins ty:$RA, ty:$RB),
                  !strconcat(opc, " $RA, $RB"), itin, pattern>{
    let L = 1;
----------------
lei137 wrote:

This looks like it was meant to be used to generate the instr `copy RA,RB,1`.
 
In the class we have:
 ```
 let Inst{10}    = L;
```
Even thought we set this explicitly to 1 on line 2005, I am not sure how that works. 

I would think the generated instr needs to be fixed up here instead?
```
                 !strconcat(opc, " $RA, $RB, $L"), itin, pattern>{
```

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


More information about the llvm-commits mailing list