[clang] [CIR] Lower global ConstArrayAttr with string elements to LLVM string constant (PR #194988)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 17:57:52 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 89123 tests passed
* 824 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CIR/Lowering/poison.cir</summary>
```
Exit Code: -6
Command Output (stdout):
--
# RUN: at line 1
cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# executed command: cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir:6:1: warning: no target triple provided, assuming x86_64-unknown-linux-gnu
# | module {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir:6:1: note: see current operation:
# | module {
# | cir.global external @poison_array = #cir.const_array<[#cir.poison : !cir.int<s, 32>, #cir.poison : !cir.int<s, 32>, #cir.poison : !cir.int<s, 32>]> : !cir.array<!cir.int<s, 32> x 3>
# | cir.func @lower_poison() -> !cir.int<s, 32> {
# | %0 = cir.const #cir.poison : !cir.int<s, 32>
# | cir.return %0 : !cir.int<s, 32>
# | }
# | }
# | unknown element in ConstArrayAttr
# | UNREACHABLE executed at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:98!
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0. Program arguments: cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# | #0 0x00000000038b3a28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# | #1 0x00000000038b0a01 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x00000000038b4841 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# | #3 0x00007ff33a2dd330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #4 0x00007ff33a336b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #5 0x00007ff33a2dd27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #6 0x00007ff33a2c08ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #7 0x000000000385bbcf (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-translate+0x385bbcf)
# | #8 0x0000000002c54937 dyn_cast<cir::IntAttr, cir::IntAttr> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Casting.h:650:3
# | #9 0x0000000002c54937 void convertToDenseElementsAttrImpl<cir::IntAttr, llvm::APInt>(cir::ConstArrayAttr, llvm::SmallVectorImpl<llvm::APInt>&, llvm::SmallVectorImpl<long> const&, long, long) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:68:34
# | #10 0x0000000002c53fd0 begin /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:277:63
# | #11 0x0000000002c53fd0 data /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:297:53
# | #12 0x0000000002c53fd0 ArrayRef<llvm::SmallVectorImpl<long>, void> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:95:18
# | #13 0x0000000002c53fd0 mlir::DenseElementsAttr convertToDenseElementsAttr<cir::IntAttr, llvm::APInt>(cir::ConstArrayAttr, llvm::SmallVectorImpl<long> const&, mlir::Type, mlir::Type) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:114:35
# | #14 0x0000000002c53da0 lowerConstArrayAttr(cir::ConstArrayAttr, mlir::TypeConverter const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:0:0
# | #15 0x00000000010c4c5f cir::direct::CIRToLLVMGlobalOpLowering::lowerInitializerForConstArray(cir::GlobalOp, mlir::Attribute&, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:2444:20
# | #16 0x00000000010c5325 cir::direct::CIRToLLVMGlobalOpLowering::matchAndRewrite(cir::GlobalOp, cir::GlobalOpAdaptor, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:2500:11
# | #17 0x0000000001126e50 _M_reset /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:317:12
# | #18 0x0000000001126e50 ~_Optional_payload /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:441:57
# | #19 0x0000000001126e50 ~_Optional_base /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:512:12
# | #20 0x0000000001126e50 llvm::LogicalResult mlir::ConversionPattern::dispatchTo1To1<mlir::OpConversionPattern<cir::GlobalOp>, cir::GlobalOp>(mlir::OpConversionPattern<cir::GlobalOp> const&, cir::GlobalOp, cir::GlobalOp::GenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../mlir/include/mlir/Transforms/DialectConversion.h:1071:1
# | #21 0x00000000010e584b mlir::OpConversionPattern<cir::GlobalOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../mlir/include/mlir/Transforms/DialectConversion.h:715:3
# | #22 0x0000000002c11684 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2416:10
# | #23 0x00000000035a4893 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:223:13
# | #24 0x00000000035a4893 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #25 0x00000000035a0a2a operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
# | #26 0x00000000035a0a2a executeAction<mlir::ApplyPatternAction, const mlir::Pattern &> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/IR/MLIRContext.h:290:7
# | #27 0x00000000035a0a2a mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:197:23
# | #28 0x0000000002c120c5 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2615:7
# | #29 0x0000000002c117ab mlir::OperationConverter::convert(mlir::Operation*, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
# | #30 0x0000000002c1271e legalizeOperations<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3469:64)> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3422:9
# | #31 0x0000000002c1271e mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3469:26
# | #32 0x0000000002c1f954 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:4213:9
# | #33 0x0000000002c1f954 void llvm::function_ref<void ()>::callback_fn<applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #34 0x0000000002c15b97 begin /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:276:45
# | #35 0x0000000002c15b97 end /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:278:27
# | #36 0x0000000002c15b97 ~SmallVector /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1229:46
# | #37 0x0000000002c15b97 applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:4217:1
# | #38 0x00000000010ce3ff cir::direct::ConvertCIRToLLVMPass::runOnOperation() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:3813:14
# | #39 0x0000000002beb888 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:0:19
# | #40 0x0000000002beb888 callback_fn<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:607:9)> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #41 0x0000000002beb888 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
# | #42 0x0000000002beb888 executeAction<mlir::PassExecutionAction, mlir::Pass &> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/IR/MLIRContext.h:290:7
# | #43 0x0000000002beb888 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:606:23
# | #44 0x0000000002bec4f6 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:688:9
# | #45 0x0000000002bf38b2 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:1128:3
# | #46 0x0000000002bf2f8a mlir::PassManager::run(mlir::Operation*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:1102:0
# | #47 0x00000000010d879c cir::direct::lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp, llvm::LLVMContext&, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:5104:7
# | #48 0x00000000010b6459 _M_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:199:51
# | #49 0x00000000010b6459 get /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:470:21
# | #50 0x00000000010b6459 operator bool /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:487:16
# | #51 0x00000000010b6459 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:164:14
# | #52 0x00000000010b6459 __invoke_impl<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:155:7) &, mlir::Operation *, llvm::raw_ostream &> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
# | #53 0x00000000010b6459 __invoke_r<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:155:7) &, mlir::Operation *, llvm::raw_ostream &> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
# | #54 0x00000000010b6459 std::_Function_handler<llvm::LogicalResult (mlir::Operation*, llvm::raw_ostream&), registerToLLVMTranslation()::$_0>::_M_invoke(std::_Any_data const&, mlir::Operation*&&, llvm::raw_ostream&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
# | #55 0x0000000002c2d682 operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
# | #56 0x0000000002c2d682 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:152:16
# | #57 0x0000000002c2d682 __invoke_impl<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:140:7) &, const std::shared_ptr<llvm::SourceMgr> &, llvm::raw_ostream &, mlir::MLIRContext *> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
# | #58 0x0000000002c2d682 __invoke_r<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:140:7) &, const std::shared_ptr<llvm::SourceMgr> &, llvm::raw_ostream &, mlir::MLIRContext *> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
# | #59 0x0000000002c2d682 std::_Function_handler<llvm::LogicalResult (std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*), mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<llvm::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_0>::_M_invoke(std::_Any_data const&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
# | #60 0x0000000002c2c39c operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
# | #61 0x0000000002c2c39c operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Tools/mlir-translate/Translation.h:81:12
# | #62 0x0000000002c2c39c operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:187:18
# | #63 0x0000000002c2c39c llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::mlirTranslateMain(int, char**, llvm::StringRef)::$_1>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #64 0x0000000002c3c0d9 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
# | #65 0x0000000002c3c0d9 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
# | #66 0x0000000002c3c0d9 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:111:12
# | #67 0x0000000002c3c0d9 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn<mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #68 0x0000000002c3bb55 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
# | #69 0x0000000002c3bb55 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:30:12
# | #70 0x0000000002c3bea7 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
# | #71 0x0000000002c3bea7 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:113:3
# | #72 0x0000000002c295fe mlir::mlirTranslateMain(int, char**, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:203:14
# | #73 0x00000000010b5423 main /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:179:17
# | #74 0x00007ff33a2c21ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #75 0x00007ff33a2c228b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #76 0x00000000010b4b05 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-translate+0x10b4b05)
# `-----------------------------
# error: command failed with exit status: -6
--
```
</details>
<details>
<summary>Clang.CIR/Lowering/poison.cir</summary>
```
Exit Code: -6
Command Output (stdout):
--
# RUN: at line 1
cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# executed command: cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir:6:1: warning: no target triple provided, assuming x86_64-unknown-linux-gnu
# | module {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir:6:1: note: see current operation:
# | module {
# | cir.global external @poison_array = #cir.const_array<[#cir.poison : !cir.int<s, 32>, #cir.poison : !cir.int<s, 32>, #cir.poison : !cir.int<s, 32>]> : !cir.array<!cir.int<s, 32> x 3>
# | cir.func @lower_poison() -> !cir.int<s, 32> {
# | %0 = cir.const #cir.poison : !cir.int<s, 32>
# | cir.return %0 : !cir.int<s, 32>
# | }
# | }
# | unknown element in ConstArrayAttr
# | UNREACHABLE executed at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:98!
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0. Program arguments: cir-translate -cir-to-llvmir --disable-cc-lowering -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/Lowering/Output/poison.cir.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/Lowering/poison.cir
# | #0 0x00000000038b3a28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# | #1 0x00000000038b0a01 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x00000000038b4841 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# | #3 0x000079f884746330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #4 0x000079f88479fb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #5 0x000079f88474627e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #6 0x000079f8847298ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #7 0x000000000385bbcf (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-translate+0x385bbcf)
# | #8 0x0000000002c54937 dyn_cast<cir::IntAttr, cir::IntAttr> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Casting.h:650:3
# | #9 0x0000000002c54937 void convertToDenseElementsAttrImpl<cir::IntAttr, llvm::APInt>(cir::ConstArrayAttr, llvm::SmallVectorImpl<llvm::APInt>&, llvm::SmallVectorImpl<long> const&, long, long) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:68:34
# | #10 0x0000000002c53fd0 begin /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:277:63
# | #11 0x0000000002c53fd0 data /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:297:53
# | #12 0x0000000002c53fd0 ArrayRef<llvm::SmallVectorImpl<long>, void> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:95:18
# | #13 0x0000000002c53fd0 mlir::DenseElementsAttr convertToDenseElementsAttr<cir::IntAttr, llvm::APInt>(cir::ConstArrayAttr, llvm::SmallVectorImpl<long> const&, mlir::Type, mlir::Type) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:114:35
# | #14 0x0000000002c53da0 lowerConstArrayAttr(cir::ConstArrayAttr, mlir::TypeConverter const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/LoweringHelpers.cpp:0:0
# | #15 0x00000000010c4c5f cir::direct::CIRToLLVMGlobalOpLowering::lowerInitializerForConstArray(cir::GlobalOp, mlir::Attribute&, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:2444:20
# | #16 0x00000000010c5325 cir::direct::CIRToLLVMGlobalOpLowering::matchAndRewrite(cir::GlobalOp, cir::GlobalOpAdaptor, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:2500:11
# | #17 0x0000000001126e50 _M_reset /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:317:12
# | #18 0x0000000001126e50 ~_Optional_payload /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:441:57
# | #19 0x0000000001126e50 ~_Optional_base /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:512:12
# | #20 0x0000000001126e50 llvm::LogicalResult mlir::ConversionPattern::dispatchTo1To1<mlir::OpConversionPattern<cir::GlobalOp>, cir::GlobalOp>(mlir::OpConversionPattern<cir::GlobalOp> const&, cir::GlobalOp, cir::GlobalOp::GenericAdaptor<llvm::ArrayRef<mlir::ValueRange>>, mlir::ConversionPatternRewriter&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../mlir/include/mlir/Transforms/DialectConversion.h:1071:1
# | #21 0x00000000010e584b mlir::OpConversionPattern<cir::GlobalOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../mlir/include/mlir/Transforms/DialectConversion.h:715:3
# | #22 0x0000000002c11684 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2416:10
# | #23 0x00000000035a4893 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:223:13
# | #24 0x00000000035a4893 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #25 0x00000000035a0a2a operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
# | #26 0x00000000035a0a2a executeAction<mlir::ApplyPatternAction, const mlir::Pattern &> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/IR/MLIRContext.h:290:7
# | #27 0x00000000035a0a2a mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Rewrite/PatternApplicator.cpp:197:23
# | #28 0x0000000002c120c5 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2615:7
# | #29 0x0000000002c117ab mlir::OperationConverter::convert(mlir::Operation*, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:0:0
# | #30 0x0000000002c1271e legalizeOperations<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3469:64)> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3422:9
# | #31 0x0000000002c1271e mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3469:26
# | #32 0x0000000002c1f954 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:4213:9
# | #33 0x0000000002c1f954 void llvm::function_ref<void ()>::callback_fn<applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #34 0x0000000002c15b97 begin /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:276:45
# | #35 0x0000000002c15b97 end /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:278:27
# | #36 0x0000000002c15b97 ~SmallVector /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1229:46
# | #37 0x0000000002c15b97 applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:4217:1
# | #38 0x00000000010ce3ff cir::direct::ConvertCIRToLLVMPass::runOnOperation() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:3813:14
# | #39 0x0000000002beb888 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:0:19
# | #40 0x0000000002beb888 callback_fn<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:607:9)> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #41 0x0000000002beb888 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
# | #42 0x0000000002beb888 executeAction<mlir::PassExecutionAction, mlir::Pass &> /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/IR/MLIRContext.h:290:7
# | #43 0x0000000002beb888 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:606:23
# | #44 0x0000000002bec4f6 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:688:9
# | #45 0x0000000002bf38b2 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:1128:3
# | #46 0x0000000002bf2f8a mlir::PassManager::run(mlir::Operation*) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Pass/Pass.cpp:1102:0
# | #47 0x00000000010d879c cir::direct::lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp, llvm::LLVMContext&, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp:5104:7
# | #48 0x00000000010b6459 _M_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:199:51
# | #49 0x00000000010b6459 get /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:470:21
# | #50 0x00000000010b6459 operator bool /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:487:16
# | #51 0x00000000010b6459 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:164:14
# | #52 0x00000000010b6459 __invoke_impl<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:155:7) &, mlir::Operation *, llvm::raw_ostream &> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
# | #53 0x00000000010b6459 __invoke_r<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:155:7) &, mlir::Operation *, llvm::raw_ostream &> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
# | #54 0x00000000010b6459 std::_Function_handler<llvm::LogicalResult (mlir::Operation*, llvm::raw_ostream&), registerToLLVMTranslation()::$_0>::_M_invoke(std::_Any_data const&, mlir::Operation*&&, llvm::raw_ostream&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
# | #55 0x0000000002c2d682 operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
# | #56 0x0000000002c2d682 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:152:16
# | #57 0x0000000002c2d682 __invoke_impl<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:140:7) &, const std::shared_ptr<llvm::SourceMgr> &, llvm::raw_ostream &, mlir::MLIRContext *> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
# | #58 0x0000000002c2d682 __invoke_r<llvm::LogicalResult, (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/Translation.cpp:140:7) &, const std::shared_ptr<llvm::SourceMgr> &, llvm::raw_ostream &, mlir::MLIRContext *> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
# | #59 0x0000000002c2d682 std::_Function_handler<llvm::LogicalResult (std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*), mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, llvm::StringRef, std::function<llvm::LogicalResult (mlir::Operation*, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::$_0>::_M_invoke(std::_Any_data const&, std::shared_ptr<llvm::SourceMgr> const&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
# | #60 0x0000000002c2c39c operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
# | #61 0x0000000002c2c39c operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir/Tools/mlir-translate/Translation.h:81:12
# | #62 0x0000000002c2c39c operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:187:18
# | #63 0x0000000002c2c39c llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::mlirTranslateMain(int, char**, llvm::StringRef)::$_1>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #64 0x0000000002c3c0d9 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
# | #65 0x0000000002c3c0d9 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
# | #66 0x0000000002c3c0d9 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:111:12
# | #67 0x0000000002c3c0d9 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn<mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #68 0x0000000002c3bb55 operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
# | #69 0x0000000002c3bb55 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:30:12
# | #70 0x0000000002c3bea7 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
# | #71 0x0000000002c3bea7 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Support/ToolUtilities.cpp:113:3
# | #72 0x0000000002c295fe mlir::mlirTranslateMain(int, char**, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp:203:14
# | #73 0x00000000010b5423 main /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/tools/cir-translate/cir-translate.cpp:179:17
# | #74 0x000079f88472b1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #75 0x000079f88472b28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #76 0x00000000010b4b05 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/cir-translate+0x10b4b05)
# `-----------------------------
# error: command failed with exit status: -6
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/194988
More information about the cfe-commits
mailing list