Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openacc] Remove duplicate operand from LoopOp getDataOperand #71576

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

razvanlupusoru
Copy link
Contributor

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

vectorLength operand was counted twice - should only be counted
once.
@llvmbot
Copy link
Member

llvmbot commented Nov 7, 2023

@llvm/pr-subscribers-mlir-openacc
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-openacc

Author: Razvan Lupusoru (razvanlupusoru)

Changes

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 --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);

Copy link
Contributor

@clementval clementval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@razvanlupusoru razvanlupusoru merged commit 0bb510c into llvm:main Nov 7, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants