[llvm] [PowerPC] Add error for incorrect use of memory operands (PR #114277)

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 14:08:23 PST 2024


================
@@ -285,6 +285,9 @@ class PPCInstrInfo : public PPCGenInstrInfo {
   bool isZExt32To64(unsigned Opcode) const {
     return get(Opcode).TSFlags & PPCII::ZExt32To64;
   }
+  bool isMemOp(unsigned Opcode) const {
+    return get(Opcode).TSFlags & PPCII::MemOp;
----------------
jakeegan wrote:

I figured register+immediate form is a memory operand because it's a single operand that accesses memory. While the register+register form is a memory operation, it is comprised of two operands. But, I agree it's unclear. I could rename it to isMemriOp (for memory register immediate operand) or something similar. The Tablegen files use "memri" and "memrr" to differentiate. 

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


More information about the llvm-commits mailing list