[llvm] [VPlan] Handle some VPInstructions in may{Read,Write}FromMemory (PR #120058)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 05:37:55 PST 2025


================
@@ -1351,6 +1351,28 @@ class VPInstruction : public VPRecipeWithIRFlags,
     }
   }
 
+  /// Returns true if the underlying opcode may read from or write to memory.
+  bool opcodeMayReadOrWriteFromMemory() const {
+    if (Instruction::isBinaryOp(getOpcode()))
+      return false;
+    switch (getOpcode()) {
+    case Instruction::Or:
----------------
Mel-Chen wrote:

We don't need to check Instruction::Or since it is binary op.

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


More information about the llvm-commits mailing list