Skip to content

[NVPTX] Small NVVMReflect bug #137062

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YonahGoldberg
Copy link
Contributor

I noticed a small bug I introduced in the NVVMReflect pass. The Changed variable should be initialized to false, because by default the pass doesn't modify the IR.

@YonahGoldberg
Copy link
Contributor Author

@AlexMaclean @Artem-B

@llvmbot
Copy link
Member

llvmbot commented Apr 23, 2025

@llvm/pr-subscribers-backend-nvptx

Author: Yonah Goldberg (YonahGoldberg)

Changes

I noticed a small bug I introduced in the NVVMReflect pass. The Changed variable should be initialized to false, because by default the pass doesn't modify the IR.


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

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVVMReflect.cpp (+1-1)
diff --git a/llvm/lib/Target/NVPTX/NVVMReflect.cpp b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
index 208bab52284a3..5ba4819afcdb5 100644
--- a/llvm/lib/Target/NVPTX/NVVMReflect.cpp
+++ b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
@@ -217,7 +217,7 @@ bool NVVMReflect::runOnModule(Module &M) {
   if (!NVVMReflectEnabled)
     return false;
   populateReflectMap(M);
-  bool Changed = true;
+  bool Changed = false;
   Changed |= handleReflectFunction(M, NVVM_REFLECT_FUNCTION);
   Changed |= handleReflectFunction(M, NVVM_REFLECT_OCL_FUNCTION);
   Changed |=

Copy link
Member

@AlexMaclean AlexMaclean left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants