[Mlir-commits] [mlir] [openacc] Remove duplicate operand from LoopOp getDataOperand (PR #71576)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Nov 7 11:23:37 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-openacc

Author: Razvan Lupusoru (razvanlupusoru)

<details>
<summary>Changes</summary>

vectorLength operand was counted twice - should only be counted once.

---
Full diff: https://github.com/llvm/llvm-project/pull/71576.diff


1 Files Affected:

- (modified) mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp (-1) 


``````````diff
diff --git a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
index ff2eb9ebfc42f5e..6e5df705fee05d8 100644
--- a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+++ b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
@@ -893,7 +893,6 @@ Value LoopOp::getDataOperand(unsigned i) {
   numOptional += getGangStatic() ? 1 : 0;
   numOptional += getVectorLength() ? 1 : 0;
   numOptional += getWorkerNum() ? 1 : 0;
-  numOptional += getVectorLength() ? 1 : 0;
   numOptional += getTileOperands().size();
   numOptional += getCacheOperands().size();
   return getOperand(numOptional + i);

``````````

</details>


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


More information about the Mlir-commits mailing list