Skip to content

[NVPTX] Add unreachable for TMA Inst Printer #117850

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

Conversation

durga4github
Copy link
Contributor

@durga4github durga4github commented Nov 27, 2024

This patch adds the llvm_reachable() for TMA
reduction opcode printer method, outside the
switch.

We had this inside the default-case leading to
the warning below (and hence was removed):
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]

This patch adds the llvm_reachable() for TMA
reduction opcode printer method.

We had this inside the default-case leading to
warning below (and hence was removed):
error: default label in switch which covers all enumeration values
       [-Werror,-Wcovered-switch-default]

Signed-off-by: Durgadoss R <[email protected]>
@llvmbot
Copy link
Member

llvmbot commented Nov 27, 2024

@llvm/pr-subscribers-backend-nvptx

Author: Durgadoss R (durga4github)

Changes

This patch adds the llvm_reachable() for TMA
reduction opcode printer method.

We had this inside the default-case leading to
warning below (and hence was removed):
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]


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

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp (+2)
diff --git a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
index 0f38f644e89af5..65e1893d3f3bdf 100644
--- a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
@@ -450,4 +450,6 @@ void NVPTXInstPrinter::printTmaReductionMode(const MCInst *MI, int OpNum,
     O << ".xor";
     return;
   }
+  llvm_unreachable(
+      "Invalid Reduction Op in printCpAsyncBulkTensorReductionMode");
 }

@durga4github
Copy link
Contributor Author

@kazutakahirata , Could you please review this?

@durga4github durga4github requested a review from Artem-B November 27, 2024 06:52
Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@durga4github durga4github merged commit 1c76958 into llvm:main Nov 28, 2024
10 checks passed
@durga4github durga4github deleted the durgadossr/nvptx_inst_printer_fix branch November 28, 2024 05:25
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-fullbuild-dbg running on libc-aarch64-ubuntu while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/11497

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ RUN      ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode (3 us)
[ RUN      ] LlvmLibcStrtouint32Test.AutomaticBaseSelection
[       OK ] LlvmLibcStrtouint32Test.AutomaticBaseSelection (4 us)
Ran 14 tests.  PASS: 14  FAIL: 0
[883/884] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (41 us)
Ran 1 tests.  PASS: 1  FAIL: 0
command timed out: 1200 seconds without output running [b'python', b'../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py', b'--debug'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1242.563269
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ RUN      ] LlvmLibcStrtouint64Test.DecodeInOtherBases
[       OK ] LlvmLibcStrtouint64Test.DecodeInOtherBases (307 ms)
[ RUN      ] LlvmLibcStrtouint64Test.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtouint64Test.CleanBaseSixteenDecode (7 us)
[ RUN      ] LlvmLibcStrtouint64Test.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtouint64Test.MessyBaseSixteenDecode (3 us)
[ RUN      ] LlvmLibcStrtouint64Test.AutomaticBaseSelection
[       OK ] LlvmLibcStrtouint64Test.AutomaticBaseSelection (4 us)
Ran 14 tests.  PASS: 14  FAIL: 0
[882/884] Running unit test libc.test.src.stdlib.strtoint32_test.__unit__
[==========] Running 14 tests from 1 test suite.
[ RUN      ] LlvmLibcStrtoint32Test.InvalidBase
[       OK ] LlvmLibcStrtoint32Test.InvalidBase (3 us)
[ RUN      ] LlvmLibcStrtoint32Test.CleanBaseTenDecode
[       OK ] LlvmLibcStrtoint32Test.CleanBaseTenDecode (7 us)
[ RUN      ] LlvmLibcStrtoint32Test.MessyBaseTenDecode
[       OK ] LlvmLibcStrtoint32Test.MessyBaseTenDecode (5 us)
[ RUN      ] LlvmLibcStrtoint32Test.DecodeInOtherBases
[       OK ] LlvmLibcStrtoint32Test.DecodeInOtherBases (308 ms)
[ RUN      ] LlvmLibcStrtoint32Test.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtoint32Test.CleanBaseSixteenDecode (8 us)
[ RUN      ] LlvmLibcStrtoint32Test.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtoint32Test.MessyBaseSixteenDecode (2 us)
[ RUN      ] LlvmLibcStrtoint32Test.AutomaticBaseSelection
[       OK ] LlvmLibcStrtoint32Test.AutomaticBaseSelection (3 us)
[ RUN      ] LlvmLibcStrtouint32Test.InvalidBase
[       OK ] LlvmLibcStrtouint32Test.InvalidBase (1 us)
[ RUN      ] LlvmLibcStrtouint32Test.CleanBaseTenDecode
[       OK ] LlvmLibcStrtouint32Test.CleanBaseTenDecode (7 us)
[ RUN      ] LlvmLibcStrtouint32Test.MessyBaseTenDecode
[       OK ] LlvmLibcStrtouint32Test.MessyBaseTenDecode (5 us)
[ RUN      ] LlvmLibcStrtouint32Test.DecodeInOtherBases
[       OK ] LlvmLibcStrtouint32Test.DecodeInOtherBases (314 ms)
[ RUN      ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode (8 us)
[ RUN      ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode (3 us)
[ RUN      ] LlvmLibcStrtouint32Test.AutomaticBaseSelection
[       OK ] LlvmLibcStrtouint32Test.AutomaticBaseSelection (4 us)
Ran 14 tests.  PASS: 14  FAIL: 0
[883/884] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (41 us)
Ran 1 tests.  PASS: 1  FAIL: 0

command timed out: 1200 seconds without output running [b'python', b'../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py', b'--debug'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1242.563269

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.

5 participants