[llvm] [X86][NFC] Hoist out `N->getOpcode()` used in ReplaceNodeResults (PR #119494)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 22:57:01 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-ubsan` running on `sanitizer-buildbot10` while building `llvm` at step 2 "annotate".

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
ld: error: undefined reference due to --no-allow-shlib-undefined: __asan_set_shadow_f8
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib/libc++abi.so

ld: error: undefined reference due to --no-allow-shlib-undefined: __asan_stack_free_7
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib/libc++abi.so

ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)


FAILED: libcxx/test/CMakeFiles/check-cxx /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/CMakeFiles/check-cxx 
cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test && /usr/bin/python3 /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/bin/llvm-lit -sv --show-xfail --show-unsupported --param enable_benchmarks="no" /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@@@STEP_FAILURE@@@
@@@BUILD_STEP stage2/ubsan check@@@
ninja: Entering directory `llvm_build_ubsan'
[1/1169] Building CXX object lib/Testing/Annotations/CMakeFiles/LLVMTestingAnnotations.dir/Annotations.cpp.o
[2/1169] Linking CXX static library lib/libLLVMTestingAnnotations.a
[3/1169] Building CXX object tools/lld/unittests/AsLibELF/CMakeFiles/LLDAsLibELFTests.dir/SomeDrivers.cpp.o
[4/1169] Building CXX object tools/lld/unittests/AsLibAll/CMakeFiles/LLDAsLibAllTests.dir/AllDrivers.cpp.o
[5/1169] Building EnumsGenTest.cpp.inc...
[6/1169] Building EnumsGenTest.h.inc...
[7/1169] Building PassGenTest.h.inc...
[8/1169] Building CXX object tools/lld/unittests/AsLibELF/CMakeFiles/LLDAsLibELFTests.dir/ROCm.cpp.o
[9/1169] Building CXX object lib/Testing/Support/CMakeFiles/LLVMTestingSupport.dir/Error.cpp.o
[10/1169] Building CXX object lib/Testing/Support/CMakeFiles/LLVMTestingSupport.dir/SupportHelpers.cpp.o
[11/1169] Building CXX object third-party/unittest/UnitTestMain/CMakeFiles/llvm_gtest_main.dir/TestMain.cpp.o
[12/1169] Building CXX object tools/mlir/unittests/Dialect/AMDGPU/CMakeFiles/MLIRAMDGPUTests.dir/AMDGPUUtilsTest.cpp.o
[13/1169] Building CXX object tools/mlir/unittests/IR/CMakeFiles/MLIRIRTests.dir/Diagnostic.cpp.o
[14/1169] Building CXX object tools/mlir/unittests/Analysis/Presburger/CMakeFiles/MLIRPresburgerTests.dir/FractionTest.cpp.o
[15/1169] Building CXX object tools/mlir/unittests/Support/CMakeFiles/MLIRSupportTests.dir/IndentedOstreamTest.cpp.o
[16/1169] Building CXX object tools/mlir/unittests/Debug/CMakeFiles/MLIRDebugTests.dir/DebugCounterTest.cpp.o
[17/1169] Building CXX object tools/mlir/unittests/Analysis/Presburger/CMakeFiles/MLIRPresburgerTests.dir/UtilsTest.cpp.o
[18/1169] Building CXX object tools/mlir/unittests/Analysis/Presburger/CMakeFiles/MLIRPresburgerTests.dir/PresburgerSpaceTest.cpp.o
[19/1169] Building CXX object tools/mlir/unittests/IR/CMakeFiles/MLIRIRTests.dir/LocationTest.cpp.o
[20/1169] Building CXX object tools/mlir/unittests/Analysis/Presburger/CMakeFiles/MLIRPresburgerTests.dir/ParserTest.cpp.o
[21/1169] Building CXX object tools/mlir/unittests/IR/CMakeFiles/MLIRIRTests.dir/TypeTest.cpp.o
[22/1169] Building CXX object tools/mlir/unittests/IR/CMakeFiles/MLIRIRTests.dir/AttrTypeReplacerTest.cpp.o
[23/1169] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-execution-engine-test.dir/execution_engine.c.o
[24/1169] Building CXX object tools/mlir/unittests/Analysis/Presburger/CMakeFiles/MLIRPresburgerTests.dir/LinearTransformTest.cpp.o
[25/1169] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-irdl-test.dir/irdl.c.o
[26/1169] Building CXX object tools/mlir/unittests/Pass/CMakeFiles/MLIRPassTests.dir/PassPipelineParserTest.cpp.o
[27/1169] Building CXX object tools/mlir/unittests/Support/CMakeFiles/MLIRSupportTests.dir/StorageUniquerTest.cpp.o
[28/1169] Building CXX object tools/mlir/unittests/Interfaces/CMakeFiles/MLIRInterfacesTests.dir/InferIntRangeInterfaceTest.cpp.o
[29/1169] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-pdl-test.dir/pdl.c.o
[30/1169] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-llvm-test.dir/llvm.c.o
Step 10 (stage2/ubsan check-cxx) failure: stage2/ubsan check-cxx (failure)
...
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib/libc++abi.so

ld: error: undefined reference due to --no-allow-shlib-undefined: __asan_set_shadow_f8
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib/libc++abi.so

ld: error: undefined reference due to --no-allow-shlib-undefined: __asan_stack_free_7
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib/libc++abi.so

ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
FAILED: libcxx/test/CMakeFiles/check-cxx /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/CMakeFiles/check-cxx 
cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test && /usr/bin/python3 /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/bin/llvm-lit -sv --show-xfail --show-unsupported --param enable_benchmarks="no" /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: 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: 85381 tests, 72 workers --
Testing: 
FAIL: Clang :: ARCMT/allowlisted/objcmt-with-allowlist-impl.m (46 of 85381)
******************** TEST 'Clang :: ARCMT/allowlisted/objcmt-with-allowlist-impl.m' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-allowlist-dir-path=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/Inputs /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/objcmt-with-allowlist-impl.m -triple x86_64-apple-darwin11 -migrate -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp.remap
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-allowlist-dir-path=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/Inputs /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/objcmt-with-allowlist-impl.m -triple x86_64-apple-darwin11 -migrate -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp.remap
RUN: at line 3: c-arcmt-test /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp.remap | arcmt-test -verify-transformed-files /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/header1.h.result /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/objcmt-with-allowlist-impl.m.result
+ c-arcmt-test /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/ARCMT/allowlisted/Output/objcmt-with-allowlist-impl.m.tmp.remap
+ arcmt-test -verify-transformed-files /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/header1.h.result /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/test/ARCMT/allowlisted/objcmt-with-allowlist-impl.m.result
==2087349==ERROR: AddressSanitizer failed to deallocate 0x15000 (86016) bytes at address 0xe79f28e20800 (error code: 22)
==2087349==Process memory map follows:
	0x000ffffff000-0x001200000000	
	0x001200000000-0x041200000000	
	0x041200000000-0x201000000000	
	0xb2ef2c110000-0xb2ef2c180000	/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/c-arcmt-test
	0xb2ef2c18f000-0xb2ef2c268000	/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/c-arcmt-test
	0xb2ef2c277000-0xb2ef2c27c000	/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/c-arcmt-test
	0xb2ef2c28b000-0xb2ef2c28f000	/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/c-arcmt-test
	0xb2ef2c28f000-0xb2ef2c883000	
	0xe47f25600000-0xe47f26109000	
	0xe47f26200000-0xe47f26210000	
	0xe47f26210000-0xe47f26a10000	
	0xe47f26c00000-0xe47f27400000	
	0xe47f27400000-0xe47f27500000	
	0xe47f27600000-0xe47f27700000	
	0xe47f27800000-0xe47f27900000	
	0xe47f27a00000-0xe47f28509000	
	0xe47f285cd000-0xe47f28620000	
	0xe47f28620000-0xe49f28e20000	
	0xe49f28e20000-0xe49f28e60000	
	0xe49f28e60000-0xe4ad28e20000	
	0xe4ad28e20000-0xe4ad28e60000	
	0xe4ad28e60000-0xe4af28e20000	
	0xe4af28e20000-0xe4af28e60000	
	0xe4af28e60000-0xe4bd28e20000	

```

</details>

https://github.com/llvm/llvm-project/pull/119494


More information about the llvm-commits mailing list