Skip to content

Conversation

bojle
Copy link
Contributor

@bojle bojle commented Aug 29, 2025

I've added support for computeKnownBitsForTargetNode for the SRLW instruction. A test has been included which uses the snippet of IR as suggested by topperc.

Fixed #154913

@RKSimon

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Aug 29, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Shreeyash Pandey (bojle)

Changes

I've added support for computeKnownBitsForTargetNode for the SRLW instruction. A test has been included which uses the snippet of IR as suggested by @topperc.

@RKSimon


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

3 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+31)
  • (modified) llvm/unittests/Target/RISCV/CMakeLists.txt (+1)
  • (added) llvm/unittests/Target/RISCV/RISCVSelectionDAGTest.cpp (+109)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 4a1db80076530..700a288e8f5c3 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -21276,6 +21276,7 @@ void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
                                                         const APInt &DemandedElts,
                                                         const SelectionDAG &DAG,
                                                         unsigned Depth) const {
+  errs() << "computeKnownBitsForTargetNode\n";
   unsigned BitWidth = Known.getBitWidth();
   unsigned Opc = Op.getOpcode();
   assert((Opc >= ISD::BUILTIN_OP_END ||
@@ -21332,6 +21333,7 @@ void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
     break;
   }
   case RISCVISD::SLLW: {
+  errs() << "computeKnownBitsForTargetNode SLLW\n";
     KnownBits Known2;
     Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1);
     Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1);
@@ -21340,6 +21342,35 @@ void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
     Known = Known.sext(BitWidth);
     break;
   }
+  case RISCVISD::SRLW: {
+    errs() << "computeKnownBitsForTargetNode SRLW\n";
+    KnownBits Known2;
+    Known = DAG.computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1);
+    Known2 = DAG.computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1);
+    Known = KnownBits::lshr(Known.trunc(32), Known2.trunc(5).zext(32));
+    // Restore the original width by sign extending.
+    Known = Known.sext(BitWidth);
+    errs() << "Known bits (SRLW) " << Known << '\n';
+    unsigned BitWidth = Known.getBitWidth();
+    unsigned zeros = 0;
+    unsigned ones = 0;
+    unsigned unknown = 0;
+    for (unsigned I = 0; I < BitWidth; ++I) {
+      unsigned N = BitWidth - I - 1;
+      if (Known.Zero[N]) {
+        zeros++;
+        errs() << "0";
+      } else if (Known.One[N]) {
+        ones++;
+        errs() << "1";
+      } else {
+        unknown++;
+        errs() << "?";
+      }
+    }
+    errs() << "Zeros " << zeros << "Ones " << ones << "Unknown " << unknown << '\n';
+    break;
+  }
   case RISCVISD::CTZW: {
     KnownBits Known2 = DAG.computeKnownBits(Op.getOperand(0), Depth + 1);
     unsigned PossibleTZ = Known2.trunc(32).countMaxTrailingZeros();
diff --git a/llvm/unittests/Target/RISCV/CMakeLists.txt b/llvm/unittests/Target/RISCV/CMakeLists.txt
index 8da8c3896faf1..701bbee55da71 100644
--- a/llvm/unittests/Target/RISCV/CMakeLists.txt
+++ b/llvm/unittests/Target/RISCV/CMakeLists.txt
@@ -19,4 +19,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_target_unittest(RISCVTests
   MCInstrAnalysisTest.cpp
   RISCVInstrInfoTest.cpp
+  RISCVSelectionDAGTest.cpp
   )
diff --git a/llvm/unittests/Target/RISCV/RISCVSelectionDAGTest.cpp b/llvm/unittests/Target/RISCV/RISCVSelectionDAGTest.cpp
new file mode 100644
index 0000000000000..a13f88484c00c
--- /dev/null
+++ b/llvm/unittests/Target/RISCV/RISCVSelectionDAGTest.cpp
@@ -0,0 +1,109 @@
+//===----------------------------------------------------------------------===//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "RISCVISelLowering.h"
+#include "llvm/Analysis/OptimizationRemarkEmitter.h"
+#include "llvm/AsmParser/Parser.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
+#include "llvm/CodeGen/SelectionDAG.h"
+#include "llvm/CodeGen/TargetLowering.h"
+#include "llvm/IR/MDBuilder.h"
+#include "llvm/IR/Module.h"
+#include "llvm/MC/TargetRegistry.h"
+#include "llvm/Support/KnownBits.h"
+#include "llvm/Support/SourceMgr.h"
+#include "llvm/Support/TargetSelect.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/Target/TargetMachine.h"
+#include "gtest/gtest.h"
+
+namespace llvm {
+
+class RISCVSelectionDAGTest : public testing::Test {
+
+protected:
+  static void SetUpTestCase() {
+    LLVMInitializeRISCVTargetInfo();
+    LLVMInitializeRISCVTarget();
+    LLVMInitializeRISCVTargetMC();
+  }
+
+  void SetUp() override {
+    StringRef Assembly = "define void @f() { ret void }";
+
+    Triple TargetTriple("riscv64", "unknown", "linux");
+
+    std::string Error;
+    const Target *T = TargetRegistry::lookupTarget("", TargetTriple, Error);
+
+    TargetOptions Options;
+    TM = std::unique_ptr<TargetMachine>(T->createTargetMachine(
+        TargetTriple, "generic", "", Options, std::nullopt, std::nullopt,
+        CodeGenOptLevel::Default));
+
+    SMDiagnostic SMError;
+    M = parseAssemblyString(Assembly, SMError, Context);
+    if (!M)
+      report_fatal_error(SMError.getMessage());
+    M->setDataLayout(TM->createDataLayout());
+
+    F = M->getFunction("f");
+    if (!F)
+      report_fatal_error("Function 'f' not found");
+
+    MachineModuleInfo MMI(TM.get());
+
+    MF = std::make_unique<MachineFunction>(*F, *TM, *TM->getSubtargetImpl(*F),
+                                           MMI.getContext(), /*FunctionNum*/ 0);
+
+    DAG = std::make_unique<SelectionDAG>(*TM, CodeGenOptLevel::None);
+    if (!DAG)
+      report_fatal_error("SelectionDAG allocation failed");
+
+    OptimizationRemarkEmitter ORE(F);
+    DAG->init(*MF, ORE, /*LibInfo*/ nullptr, /*AA*/ nullptr,
+              /*AC*/ nullptr, /*MDT*/ nullptr, /*MSDT*/ nullptr, MMI, nullptr);
+  }
+
+  LLVMContext Context;
+  std::unique_ptr<TargetMachine> TM;
+  std::unique_ptr<Module> M;
+  Function *F = nullptr;
+  std::unique_ptr<MachineFunction> MF;
+  std::unique_ptr<SelectionDAG> DAG;
+};
+
+/// SRLW: Logical Shift Right
+TEST_F(RISCVSelectionDAGTest, computeKnownBits_SRLW) {
+  // Following DAG is created from this IR snippet:
+  //
+  // define i64 @f(i32 %x, i32 %y) {
+  //  %a = and i32 %x, 2147483647  ; zeros the MSB for %x
+  //  %b = lshr i32 %a, %y
+  //  %c = zext i32 %b to i64 ; makes the most significant 32 bits 0
+  //  ret i64 %c
+  // }
+  SDLoc Loc;
+  auto IntVT = EVT::getIntegerVT(Context, 32);
+  auto Int64VT = EVT::getIntegerVT(Context, 64);
+  auto Px = DAG->getRegister(0, IntVT);
+  auto Py = DAG->getConstant(2147483647, Loc, IntVT);
+  auto N1 = DAG->getNode(ISD::AND, Loc, IntVT, Px, Py);
+  auto Qx = DAG->getRegister(0, IntVT);
+  auto N2 = DAG->getNode(ISD::SRL, Loc, IntVT, N1, Qx);
+  auto N3 = DAG->getNode(ISD::ZERO_EXTEND, Loc, Int64VT, N2);
+  // N1 = 0???????????????????????????????
+  // N2 = 0???????????????????????????????
+  // N3 = 000000000000000000000000000000000???????????????????????????????
+  // After zero extend, we expect 33 most significant zeros to be known:
+  // 32 from sign extension and 1 from AND operation
+  KnownBits Known = DAG->computeKnownBits(N3);
+  EXPECT_EQ(Known.Zero, APInt(64, -2147483648));
+  EXPECT_EQ(Known.One, APInt(64, 0));
+}
+
+} // end namespace llvm

@RKSimon RKSimon linked an issue Aug 29, 2025 that may be closed by this pull request
@RKSimon RKSimon requested review from asb and topperc August 29, 2025 09:33
Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
TEST_F(RISCVSelectionDAGTest, computeKnownBits_SRLW) {
// Following DAG is created from this IR snippet:
//
// define i64 @f(i32 %x, i32 %y) {
Copy link
Member

Choose a reason for hiding this comment

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

you could also add a LIT codegen test instead of unittest using this LLVM IR as input. Personally I thought that would be more succinct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to write a LIT test, but couldn't get my head around it. My rationale to write a unittest was that I am adding a small portion of code for Known Bits Analysis of the SRLW, so I have to check whether computeKnownBits for SRLW returns appropriately. Is there a way to test for the values of known bits through the llvm IR, so a lit test can be written? As I understand, a lit test would be able to check if the SRLW instruction has been generated or not (and in the expected format). This, I believe already happens in the RISCV codegen. Can you show me an example to understand this clearly?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can't test the KnownBits directly, but you can test that it enables optimizations. Here's the recent PR I wrote for sign bits of SRAW. #155564

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, would you recommend I work on a lit test too? What about the current unittest (drop it/keep it)?

@mshockwave
Copy link
Member

Please avoid force push unless necessary: https://llvm.org/docs/GitHub.html#rebasing-pull-requests-and-force-pushes

Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
@bojle
Copy link
Contributor Author

bojle commented Aug 31, 2025

I've re-written this based on the output of 'llc'. The last part:

auto Py2 = DAG->getConstant(4294967295, Loc, Int64VT);
auto N3 = DAG->getNode(ISD::AND, Loc, Int64VT, N2, Py2);

is still redundant, but i've kept it for sake of imitating the generated DAG.

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

github-actions bot commented Sep 1, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
bojle and others added 2 commits September 3, 2025 17:33
@RKSimon RKSimon enabled auto-merge (squash) September 3, 2025 13:14
@RKSimon RKSimon merged commit 20b4f59 into llvm:main Sep 3, 2025
9 checks passed
Copy link

github-actions bot commented Sep 3, 2025

@bojle Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 3, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-qemu running on sanitizer-buildbot3 while building llvm at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[75/77] Generating ScudoUnitTestsObjects.combined_test.cpp.mips64el.o
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
[76/77] Generating ScudoUnitTest-mips64el-Test
[76/77] Running Scudo Standalone tests
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 184 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: ScudoStandalone-Unit :: ./ScudoUnitTest-mips64el-Test/94/166 (184 of 184)
******************** TEST 'ScudoStandalone-Unit :: ./ScudoUnitTest-mips64el-Test/94/166' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_mips64el_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64el-Test-ScudoStandalone-Unit-3631201-94-166.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=166 GTEST_SHARD_INDEX=94 /home/b/sanitizer-x86_64-linux-qemu/build/qemu_build/qemu-mips64el -L /usr/mips64el-linux-gnuabi64 /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_mips64el_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64el-Test
--

Note: This is test shard 95 of 166.
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from ScudoCombinedDeathTestBasicCombined17_DefaultConfig
[ RUN      ] ScudoCombinedDeathTestBasicCombined17_DefaultConfig.BasicCombined17

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.
Step 16 (scudo mips64el_qemu) failure: scudo mips64el_qemu (failure)
...
[75/77] Generating ScudoUnitTestsObjects.combined_test.cpp.mips64el.o
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
[76/77] Generating ScudoUnitTest-mips64el-Test
[76/77] Running Scudo Standalone tests
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 184 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: ScudoStandalone-Unit :: ./ScudoUnitTest-mips64el-Test/94/166 (184 of 184)
******************** TEST 'ScudoStandalone-Unit :: ./ScudoUnitTest-mips64el-Test/94/166' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_mips64el_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64el-Test-ScudoStandalone-Unit-3631201-94-166.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=166 GTEST_SHARD_INDEX=94 /home/b/sanitizer-x86_64-linux-qemu/build/qemu_build/qemu-mips64el -L /usr/mips64el-linux-gnuabi64 /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_mips64el_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64el-Test
--

Note: This is test shard 95 of 166.
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from ScudoCombinedDeathTestBasicCombined17_DefaultConfig
[ RUN      ] ScudoCombinedDeathTestBasicCombined17_DefaultConfig.BasicCombined17

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

[WARNING] /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/../third-party/unittest/googletest/src/gtest-death-test.cc:1102:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 3, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[77/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[78/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[1238/1246] Linking CXX executable unittests/Target/RISCV/RISCVTests
FAILED: unittests/Target/RISCV/RISCVTests 
: && /usr/lib64/ccache/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--gc-sections unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/MCInstrAnalysisTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVInstrInfoTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o -o unittests/Target/RISCV/RISCVTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib  lib/libLLVMRISCVCodeGen.so.22.0git  lib/libLLVMRISCVDesc.so.22.0git  lib/libLLVMRISCVInfo.so.22.0git  lib/libLLVMPasses.so.22.0git  -lpthread  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMSelectionDAG.so.22.0git  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMAnalysis.so.22.0git  lib/libLLVMMC.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libLLVMTargetParser.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib && :
/usr/bin/ld: unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o: undefined reference to symbol '_ZN4llvm19parseAssemblyStringENS_9StringRefERNS_12SMDiagnosticERNS_11LLVMContextEPNS_11SlotMappingE'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/libLLVMAsmParser.so.22.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[1240/1246] Linking CXX executable tools/clang/unittests/AllClangUnitTests
ninja: build stopped: subcommand failed.
Step 11 (ninja check 2) failure: stage 2 checked (failure)
...
[77/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[78/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[79/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[80/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[81/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-calls-Dynamic-Test
[82/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Test
[83/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-inline.o
[84/85] Generating POWERPC64LELinuxDynamicConfig/Asan-powerpc64le-inline-Dynamic-Test
[85/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Test
[876/1246] Linking CXX executable unittests/Target/RISCV/RISCVTests
FAILED: unittests/Target/RISCV/RISCVTests 
: && /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--gc-sections unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/MCInstrAnalysisTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVInstrInfoTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o -o unittests/Target/RISCV/RISCVTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib  lib/libLLVMRISCVCodeGen.so.22.0git  lib/libLLVMRISCVDesc.so.22.0git  lib/libLLVMRISCVInfo.so.22.0git  lib/libLLVMPasses.so.22.0git  -lpthread  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMSelectionDAG.so.22.0git  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMAnalysis.so.22.0git  lib/libLLVMMC.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libLLVMTargetParser.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib && :
/usr/bin/ld: unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o: undefined reference to symbol '_ZN4llvm19parseAssemblyStringENS_9StringRefERNS_12SMDiagnosticERNS_11LLVMContextEPNS_11SlotMappingE'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/libLLVMAsmParser.so.22.0git: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[1141/1246] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassBuilderCallbacksTest.cpp.o
[1143/1246] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/TokenAnnotatorTest.cpp.o
[1144/1246] Building CXX object tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/LocateSymbolTest.cpp.o
[1145/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapBinaryOperandsTests.cpp.o
[1146/1246] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
[1147/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
[1148/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ModulesTests.cpp.o
[1149/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandDeducedTypeTests.cpp.o
[1150/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ShowSelectionTreeTests.cpp.o
[1151/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ASTTests.cpp.o
[1152/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/InsertionPointTests.cpp.o
[1153/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/TweakTesting.cpp.o
[1154/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/IncludeCleanerTests.cpp.o
[1155/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapIfBranchesTests.cpp.o
[1156/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/FileIndexTests.cpp.o
[1157/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/MemberwiseConstructorTests.cpp.o
[1158/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[1159/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
[1160/1246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/FlowSensitive/TransferTest.cpp.o
[1161/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HoverTests.cpp.o
[1162/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineOutlineTests.cpp.o
[1163/1246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RecursiveASTVisitorTests/InitListExprPostOrder.cpp.o
[1164/1246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/StaticAnalyzer/RangeSetTest.cpp.o
[1165/1246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ASTImporterGenericRedeclTest.cpp.o
[1166/1246] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/SandboxIRTest.cpp.o
[1167/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[1168/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/StdLibTests.cpp.o
[1169/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SourceCodeTests.cpp.o
[1170/1246] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/APFloatTest.cpp.o
[1171/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SelectionTests.cpp.o
[1172/1246] Building CXX object unittests/Transforms/Scalar/CMakeFiles/ScalarTests.dir/LoopPassManagerTest.cpp.o
[1173/1246] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/ASTImporterODRStrategiesTest.cpp.o
[1174/1246] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/HeadersTests.cpp.o
[1175/1246] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/OverlappingReplacementsTest.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 3, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building llvm at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
0.193 [1/3/2] Building CXX object compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_dynamic_version_script_dummy.powerpc64le.dir/dummy.cpp.o
0.423 [0/3/3] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/22/lib/powerpc64le-unknown-linux-gnu/libclang_rt.ubsan_standalone.so
0.448 [0/2/4] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/22/lib/powerpc64le-unknown-linux-gnu/libclang_rt.asan.so
1.286 [0/1/5] Generating /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/compile_commands.json
25.707 [4/2/1244] cd /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins && /home/buildbots/llvm-external-buildbots/cmake-3.31.2/bin/cmake --build /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins/ --target runtimes-test-depends --config Release
ninja: no work to do.
25.775 [3/2/1245] No install step for 'runtimes'
25.798 [2/2/1247] Completed 'runtimes'
32.549 [2/1/1248] Building CXX object unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o
32.606 [1/1/1249] Linking CXX executable unittests/Target/RISCV/RISCVTests
FAILED: unittests/Target/RISCV/RISCVTests 
: && /home/buildbots/llvm-external-buildbots/clang.19.1.7/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--color-diagnostics     -Wl,--gc-sections  -Xlinker --dependency-file=unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/link.d unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/MCInstrAnalysisTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVInstrInfoTest.cpp.o unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o -o unittests/Target/RISCV/RISCVTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib  lib/libLLVMRISCVCodeGen.so.22.0git  lib/libLLVMRISCVDesc.so.22.0git  lib/libLLVMRISCVInfo.so.22.0git  lib/libLLVMPasses.so.22.0git  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMSelectionDAG.so.22.0git  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMAnalysis.so.22.0git  lib/libLLVMMC.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libLLVMTargetParser.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib && :
ld.lld: error: undefined symbol: llvm::parseAssemblyString(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::SlotMapping*)
>>> referenced by RISCVSelectionDAGTest.cpp
>>>               unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/RISCVSelectionDAGTest.cpp.o:(llvm::RISCVSelectionDAGTest::SetUp())
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

@RKSimon
Copy link
Collaborator

RKSimon commented Sep 3, 2025

@bojle From the buildbot failures it looks like there's a missing lib dependency

@topperc
Copy link
Collaborator

topperc commented Sep 3, 2025

@bojle From the buildbot failures it looks like there's a missing lib dependency

Does 5cf1245 fix it?

@RKSimon
Copy link
Collaborator

RKSimon commented Sep 3, 2025

@bojle From the buildbot failures it looks like there's a missing lib dependency

Does 5cf1245 fix it?

Yes - I think so - cheers @kparzysz

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.

[RISCV] computeKnownBitsForTargetNode - add RISCVISD::SRLW handling
6 participants