Skip to content

Conversation

woruyu
Copy link
Member

@woruyu woruyu commented Jul 18, 2025

Summary

This PR resolves #147179

@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2025

@llvm/pr-subscribers-backend-arm

Author: woruyu (woruyu)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Target/ARM/ARMISelLowering.cpp (+25)
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index fd3b0525c1056..e9ec35fa1dd8c 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -20106,6 +20106,31 @@ void ARMTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
     Known = KnownOp0.intersectWith(KnownOp1);
     break;
   }
+  case ARMISD::VORRIMM: {
+    KnownBits KnownLHS = DAG.computeKnownBits(Op.getOperand(0), Depth + 1);
+
+    unsigned Encoded = Op.getConstantOperandVal(1);
+    unsigned ElemSize = Op.getValueType().getScalarSizeInBits();
+    uint64_t DecodedVal = ARM_AM::decodeVMOVModImm(Encoded, ElemSize);
+    APInt Imm(Known.getBitWidth(), DecodedVal);
+
+    Known.One = KnownLHS.One | Imm;
+    Known.Zero = KnownLHS.Zero & ~Imm;
+    return;
+  }
+  case ARMISD::VBICIMM: {
+    KnownBits KnownLHS = DAG.computeKnownBits(Op.getOperand(0), Depth + 1);
+
+    unsigned Encoded = Op.getConstantOperandVal(1);
+    unsigned ElemSize = Op.getValueType().getScalarSizeInBits();
+    uint64_t DecodedVal = ARM_AM::decodeVMOVModImm(Encoded, ElemSize);
+    APInt Imm(Known.getBitWidth(), DecodedVal);
+
+    APInt NotImm = ~Imm;
+    Known.One = KnownLHS.One & NotImm;
+    Known.Zero = KnownLHS.Zero | Imm;
+    return;
+  }
   }
 }
 

@RKSimon RKSimon requested review from ostannard and davemgreen July 21, 2025 07:23
@RKSimon
Copy link
Collaborator

RKSimon commented Jul 21, 2025

Test coverage? Some of the ARM experts may have some suggestions.

@davemgreen
Copy link
Collaborator

Finding the tests for this is often difficult. Is it worth adding a test like AArch64SelectionDAGTest for them?

@woruyu woruyu force-pushed the feat/add-vorrimm-vbicimm-for-computeKnownBitsForTargetNode branch 3 times, most recently from c4942f4 to e8e0ba2 Compare August 15, 2025 07:39
Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, it looks good.

Copy link

github-actions bot commented Aug 18, 2025

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

@woruyu woruyu force-pushed the feat/add-vorrimm-vbicimm-for-computeKnownBitsForTargetNode branch from a3722f0 to 6882840 Compare August 18, 2025 12:09
@woruyu woruyu force-pushed the feat/add-vorrimm-vbicimm-for-computeKnownBitsForTargetNode branch from 4f60b47 to f3b5b90 Compare August 29, 2025 02:56
@woruyu woruyu force-pushed the feat/add-vorrimm-vbicimm-for-computeKnownBitsForTargetNode branch from f3b5b90 to a7fbc84 Compare September 3, 2025 10:04
Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

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

LGTM - but will leave it to an ARM expert to accept

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM.

Are you happy for this to be submitted?

@woruyu
Copy link
Member Author

woruyu commented Sep 4, 2025

Thanks. LGTM.

Are you happy for this to be submitted?

Yes, thanks. I’ll land this shortly.

@woruyu woruyu merged commit 010f1ea into llvm:main Sep 4, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: MinGW/driver.test' FAILED ********************
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 1
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m i386pe 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X86 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m i386pe
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X86 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 7
echo "-### foo.o -m i386pe" > /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/lld/test/MinGW/Output/driver.test.tmp.rsp
# executed command: echo '-### foo.o -m i386pe'
# note: command had no output on stdout or stderr
# RUN: at line 8
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld @/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/lld/test/MinGW/Output/driver.test.tmp.rsp 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X86 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld @/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/tools/lld/test/MinGW/Output/driver.test.tmp.rsp
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X86 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 10
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m i386pep 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X64 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m i386pep
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=X64 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 16
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m thumb2pe 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m thumb2pe
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 22
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m arm64pe 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m arm64pe
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64 /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 28
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m arm64ecpe 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64EC /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m arm64ecpe
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64EC /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# note: command had no output on stdout or stderr
# RUN: at line 34
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld -### foo.o -m arm64xpe 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64X /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/ld.lld '-###' foo.o -m arm64xpe
# note: command had no output on stdout or stderr
# executed command: /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=ARM64X /Users/buildbot/buildbot-root/llvm-project/lld/test/MinGW/driver.test
...

@woruyu
Copy link
Member Author

woruyu commented Sep 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference

I looked into the lld :: MinGW/driver.test failure on llvm-clang-aarch64-darwin (doug-worker-4).

This isn’t caused by my patch. The builder is hitting an environment issue:

Could not create process (.../FileCheck) due to [Errno 24] Too many open files
error: command failed with exit status: 127

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 4, 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/12646

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/ProfileData/BPFunctionNodeTest.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1028:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1037:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
[803/1247] Linking CXX executable unittests/Target/ARM/ARMTests
FAILED: unittests/Target/ARM/ARMTests 
: && /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/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o -o unittests/Target/ARM/ARMTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib  lib/libLLVMARMCodeGen.so.22.0git  lib/libLLVMARMDesc.so.22.0git  lib/libLLVMARMInfo.so.22.0git  lib/libLLVMGlobalISel.so.22.0git  lib/libLLVMMIRParser.so.22.0git  lib/libLLVMSelectionDAG.so.22.0git  -lpthread  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMCodeGenTypes.so.22.0git  lib/libLLVMTarget.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/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o: undefined reference to symbol '_ZN4llvm18BlockFrequencyInfoD1Ev'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/libLLVMAnalysis.so.22.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[834/1247] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/DataAccessProfTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/DataAccessProf.h:25,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/ProfileData/DataAccessProfTest.cpp:10:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1028:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1037:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
[984/1247] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/CoverageMappingTest.cpp.o
In file included from /usr/include/c++/8/cassert:44,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:40,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:27,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/ProfileData/CoverageMappingTest.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1028:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/ProfileData/InstrProf.h:1037:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~~~~~~~~~
[985/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Driver/ToolChainTest.cpp.o
[987/1247] Building CXX object tools/clang/unittests/Sema/CMakeFiles/SemaTests.dir/GslOwnerPointerInference.cpp.o
[988/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/ASTSelectionTest.cpp.o
[989/1247] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/MergeTest.cpp.o
[990/1247] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/ClangDocTest.cpp.o
[991/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Index/IndexTests.cpp.o
[992/1247] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/MDGeneratorTest.cpp.o
[993/1247] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/JSONGeneratorTest.cpp.o
Step 11 (ninja check 2) failure: stage 2 checked (failure)
...
[77/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-inline-Noinst-Test
[78/85] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[79/85] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64le-calls.o
[80/85] Generating POWERPC64LELinuxConfig/Asan-powerpc64le-calls-Noinst-Test
[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
[890/1247] Linking CXX executable unittests/Target/ARM/ARMTests
FAILED: unittests/Target/ARM/ARMTests 
: && /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/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o -o unittests/Target/ARM/ARMTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib  lib/libLLVMARMCodeGen.so.22.0git  lib/libLLVMARMDesc.so.22.0git  lib/libLLVMARMInfo.so.22.0git  lib/libLLVMGlobalISel.so.22.0git  lib/libLLVMMIRParser.so.22.0git  lib/libLLVMSelectionDAG.so.22.0git  -lpthread  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMCodeGenTypes.so.22.0git  lib/libLLVMTarget.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/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o: undefined reference to symbol '_ZN4llvm18BlockFrequencyInfoD1Ev'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/libLLVMAnalysis.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)
[1089/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/RangeSelectorTest.cpp.o
[1091/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DefineOutlineTests.cpp.o
[1092/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapIfBranchesTests.cpp.o
[1093/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/TweakTests.cpp.o
[1094/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExtractFunctionTests.cpp.o
[1095/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Analysis/IntervalPartitionTest.cpp.o
[1096/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
[1097/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DumpASTTests.cpp.o
[1098/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CodeCompletionStringsTests.cpp.o
[1099/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/RawStringLiteralTests.cpp.o
[1100/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SelectionTests.cpp.o
[1101/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ShowSelectionTreeTests.cpp.o
[1102/1247] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/ConfigParseTest.cpp.o
[1103/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/RemoveUsingNamespaceTests.cpp.o
[1104/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/TweakTesting.cpp.o
[1105/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/RecursiveASTVisitorTest.cpp.o
[1106/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/CollectMacrosTests.cpp.o
[1107/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AnnotateHighlightingsTests.cpp.o
[1108/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/DumpSymbolTests.cpp.o
[1109/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ObjCMemberwiseInitializerTests.cpp.o
[1110/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ScopifyEnumTests.cpp.o
[1111/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/PopulateSwitchTests.cpp.o
[1112/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/SwapBinaryOperandsTests.cpp.o
[1113/1247] Building CXX object tools/clang/unittests/Sema/CMakeFiles/SemaTests.dir/HeuristicResolverTest.cpp.o
[1114/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExtractVariableTests.cpp.o
[1115/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/MemberwiseConstructorTests.cpp.o
[1116/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/ExpandMacroTests.cpp.o
[1117/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/DexTests.cpp.o
[1118/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/tweaks/AddUsingTests.cpp.o
[1119/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ClangdLSPServerTests.cpp.o
[1120/1247] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SnippetGeneratorTest.cpp.o
[1121/1247] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/InstrProfTest.cpp.o
[1122/1247] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/SemanticSelectionTests.cpp.o
[1123/1247] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/AST/StructuralEquivalenceTest.cpp.o

@RKSimon
Copy link
Collaborator

RKSimon commented Sep 4, 2025

The clang-ppc64le-linux-multistage failure does look related though - missing Analysis lib dependency:

: && /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/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o -o unittests/Target/ARM/ARMTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib  lib/libLLVMARMCodeGen.so.22.0git  lib/libLLVMARMDesc.so.22.0git  lib/libLLVMARMInfo.so.22.0git  lib/libLLVMGlobalISel.so.22.0git  lib/libLLVMMIRParser.so.22.0git  lib/libLLVMSelectionDAG.so.22.0git  -lpthread  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMCodeGenTypes.so.22.0git  lib/libLLVMTarget.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/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o: undefined reference to symbol '_ZN4llvm18BlockFrequencyInfoD1Ev'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/libLLVMAnalysis.so.22.0git: error adding symbols: DSO missing from command line

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 4, 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/9555

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
0.196 [1/3/2] Building CXX object compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic_version_script_dummy.powerpc64le.dir/dummy.cpp.o
0.429 [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.453 [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.156 [0/1/5] Generating /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/compile_commands.json
25.858 [4/2/1245] 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.926 [3/2/1246] No install step for 'runtimes'
25.951 [2/2/1248] Completed 'runtimes'
32.584 [2/1/1249] Building CXX object unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o
32.639 [1/1/1250] Linking CXX executable unittests/Target/ARM/ARMTests
FAILED: unittests/Target/ARM/ARMTests 
: && /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/ARM/CMakeFiles/ARMTests.dir/link.d unittests/Target/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o -o unittests/Target/ARM/ARMTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib  lib/libLLVMARMCodeGen.so.22.0git  lib/libLLVMARMDesc.so.22.0git  lib/libLLVMARMInfo.so.22.0git  lib/libLLVMGlobalISel.so.22.0git  lib/libLLVMMIRParser.so.22.0git  lib/libLLVMSelectionDAG.so.22.0git  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMCodeGenTypes.so.22.0git  lib/libLLVMTarget.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 ARMSelectionDAGTest.cpp
>>>               unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o:(llvm::ARMSelectionDAGTest::SetUp())

ld.lld: error: undefined symbol: llvm::OptimizationRemarkEmitter::OptimizationRemarkEmitter(llvm::Function const*)
>>> referenced by ARMSelectionDAGTest.cpp
>>>               unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o:(llvm::ARMSelectionDAGTest::SetUp())

ld.lld: error: undefined symbol: llvm::BlockFrequencyInfo::~BlockFrequencyInfo()
>>> referenced by ARMSelectionDAGTest.cpp
>>>               unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o:(llvm::ARMSelectionDAGTest::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 4, 2025

clang-ppc64le-rhel appears to missing LLVMAsmParser

: && /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/ARM/CMakeFiles/ARMTests.dir/link.d unittests/Target/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/ARMSelectionDAGTest.cpp.o -o unittests/Target/ARM/ARMTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib  lib/libLLVMARMCodeGen.so.22.0git  lib/libLLVMARMDesc.so.22.0git  lib/libLLVMARMInfo.so.22.0git  lib/libLLVMGlobalISel.so.22.0git  lib/libLLVMMIRParser.so.22.0git  lib/libLLVMSelectionDAG.so.22.0git  lib/libllvm_gtest_main.so.22.0git  lib/libllvm_gtest.so.22.0git  -lpthread  lib/libLLVMCodeGen.so.22.0git  lib/libLLVMCodeGenTypes.so.22.0git  lib/libLLVMTarget.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*)

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.

[DAG][ARM] computeKnownBitsForTargetNode - add handling for ARMISD VORRIMM\VBICIMM nodes
5 participants