[llvm] [RISCV] Add PseudoClearGPR to the special cases in RISCVInstrInfo::getInstSizeInBytes. (PR #203637)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 14:49:57 PDT 2026


https://github.com/arichardson approved this pull request.

I failed to look at the original PR, but why do we have Size = 8 by default? Isn't it just a single ADDI expansion?

```
let hasSideEffects = 0, mayLoad = 0, mayStore = 0, Size = 8,
    isCodeGenOnly = true in
def PseudoClearGPR : Pseudo<(outs GPR:$rd), (ins), []>,
                     PseudoInstExpansion<(ADDI GPR:$rd, X0, 0)>;
```

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


More information about the llvm-commits mailing list