[llvm] fix a bug of PPCMIPeepholes which description in issue 71030 (PR #85451)

zhijian lin via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 13:51:17 PDT 2024


diggerlin wrote:





> I think it would be worthwhile investigating whether this can be accomplished significantly more easily and succinctly by implementing another `InstrMapping` similar to the record-form ones we have (`getRecordFormOpcode, getNonRecordFormOpcode`). If we have a pair of mappings similar to those but that represent `get64BitMnemonic` and `get32BitMnemonic`, we should be able to just use those rather than a big `switch`.

I added a 
```
def get64BitInstrFromSignedExt32BitInstr : InstrMapping {
...
}
```

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


More information about the llvm-commits mailing list