[llvm] [LLVM][NVPTX]: Add intrinsic for setmaxnreg (PR #77289)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 01:36:49 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3574b61013b341c96d5c9b7d2ca5480a398586b3 a10cfe5a83b2c5f86971fa3820e4349e7eab1c4d -- llvm/include/llvm/Support/NVVMIntrinsicFlags.h llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Support/NVVMIntrinsicFlags.h b/llvm/include/llvm/Support/NVVMIntrinsicFlags.h
index 23c265831a..49b0c4ba81 100644
--- a/llvm/include/llvm/Support/NVVMIntrinsicFlags.h
+++ b/llvm/include/llvm/Support/NVVMIntrinsicFlags.h
@@ -28,7 +28,7 @@ enum SetMaxNRegAction {
typedef union {
uint32_t V;
struct {
- uint32_t Action : 1; // inc(0) or dec(1)
+ uint32_t Action : 1; // inc(0) or dec(1)
uint32_t reserved : 31;
} U;
} SetMaxNRegFlags;
diff --git a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
index c5e575e805..932b420752 100644
--- a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
@@ -350,13 +350,13 @@ void NVPTXInstPrinter::printSetMaxNRegActionFlag(const MCInst *MI, int OpNum,
using Action = nvvm::SetMaxNRegAction;
switch (Flags.U.Action) {
- case Action::ACTION_INC:
- O << ".inc";
- break;
- case Action::ACTION_DEC:
- O << ".dec";
- break;
- default:
- llvm_unreachable("Invalid action flag for setmaxnreg intrinsic");
+ case Action::ACTION_INC:
+ O << ".inc";
+ break;
+ case Action::ACTION_DEC:
+ O << ".dec";
+ break;
+ default:
+ llvm_unreachable("Invalid action flag for setmaxnreg intrinsic");
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/77289
More information about the llvm-commits
mailing list