Skip to content

[NVPTX] Address warning and typo in fp128 support #136207

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

AlexMaclean
Copy link
Member

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 17, 2025

@llvm/pr-subscribers-backend-nvptx

Author: Alex MacLean (AlexMaclean)

Changes

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

2 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h (+1-1)
  • (modified) llvm/test/CodeGen/NVPTX/fp128-storage-type.ll (+1-1)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
index 9ed7e650e7b0c..978167ac19d59 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
@@ -125,7 +125,7 @@ class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter {
     }
 
     void addZeros(unsigned Num) {
-      for (unsigned _ : llvm::seq(Num))
+      for ([[maybe_unused]] unsigned _ : llvm::seq(Num))
         addByte(0);
     }
 
diff --git a/llvm/test/CodeGen/NVPTX/fp128-storage-type.ll b/llvm/test/CodeGen/NVPTX/fp128-storage-type.ll
index 5b96f4978a7cb..9a16c11300c70 100644
--- a/llvm/test/CodeGen/NVPTX/fp128-storage-type.ll
+++ b/llvm/test/CodeGen/NVPTX/fp128-storage-type.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
 ; RUN: llc < %s -mcpu=sm_20 | FileCheck %s
-; RUN: %if ptxas %{ llc < %s-mcpu=sm_20 | %ptxas-verify %}
+; RUN: %if ptxas %{ llc < %s -mcpu=sm_20 | %ptxas-verify %}
 
 target triple = "nvptx64-unknown-cuda"
 

@AlexMaclean AlexMaclean force-pushed the dev/amaclean/upstream/fp128-fix branch from 92e3857 to 3509f90 Compare April 17, 2025 21:42
@AlexMaclean AlexMaclean force-pushed the dev/amaclean/upstream/fp128-fix branch from 3509f90 to 047bb55 Compare April 17, 2025 21:44
@AlexMaclean AlexMaclean merged commit f0f5545 into llvm:main Apr 17, 2025
11 checks passed
Comment on lines +128 to 130
for ([[maybe_unused]] unsigned _ : llvm::seq(Num)) {
addByte(0);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Could you remove the curly braces that I added? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see that you've already merged this. Never mind then.

IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
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