[clang] [llvm] [inlineasm] Add special support for "rm" inline asm constraints (PR #181973)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 15:48:28 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 172079 tests passed
* 3091 tests skipped
* 5 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.CodeGen/X86/asm-constraints-rm.ll</summary>
```
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-linux-gnu -O2 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-linux-gnu -O2
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-linux-gnu -O0 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=O0 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-linux-gnu -O0
# .---command stderr------------
# | llc: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:10298: void llvm::SelectionDAGBuilder::visitInlineAsm(const CallBase &, const BasicBlock *): Assertion `(OpInfo.isMultipleAlternative || (OpInfo.Type == InlineAsm::isInput)) && "Can only indirectify direct input operands!"' failed.
# | 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: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-linux-gnu -O0
# | 1. Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test3'
# | #0 0x00000000085c8c58 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 0x00000000085c5bc1 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x00000000085c9a71 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# | #3 0x0000792462454330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #4 0x00007924624adb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #5 0x000079246245427e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #6 0x00007924624378ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #7 0x000079246243781b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# | #8 0x000079246244a517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# | #9 0x00000000082d80e0 llvm::SelectionDAGBuilder::visitInlineAsm(llvm::CallBase const&, llvm::BasicBlock const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:10224:5
# | #10 0x00000000082b3776 getValueID /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Value.h:544:12
# | #11 0x00000000082b3776 getOpcode /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Instruction.h:348:39
# | #12 0x00000000082b3776 isTerminator /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Instruction.h:351:51
# | #13 0x00000000082b3776 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1396:10
# | #14 0x00000000083908a5 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, bool&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:0:12
# | #15 0x000000000838f939 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1896:15
# | #16 0x000000000838d011 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:659:22
# | #17 0x000000000838a6e0 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:400:20
# | #18 0x000000000727ec23 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #19 0x00000000077f0998 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
# | #20 0x00000000077f8442 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #21 0x00000000077f140b runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #22 0x00000000077f140b llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #23 0x0000000004f9d37b compileModule(char**, llvm::SmallVectorImpl<llvm::PassPlugin>&, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:882:17
# | #24 0x0000000004f9a2c3 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:460:13
# | #25 0x00007924624391ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #26 0x000079246243928b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #27 0x0000000004f95de5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4f95de5)
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=O0 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=O0 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/asm-constraints-rm.ll
# `-----------------------------
# error: command failed with exit status: 2
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/inline-asm-prepare-attributes.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll:8:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:7:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:9:12: note: possible intended match here
# | store i32 %0, ptr %p, align 4
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll:26:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:14:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:15:2: note: possible intended match here
# | %0 = call range(i32 0, 10) i32 asm "mov $0, $1", "=r,rm"(i32 %x)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-attributes.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: define void @test_ret_attr_drop(i32 %x, ptr %p) {
# | 7: entry:
# | next:8'0 X error: no match found
# | 8: %0 = call range(i32 0, 10) i32 asm sideeffect "mov $1, $0", "=rm,rm"(i32 %x)
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 9: store i32 %0, ptr %p, align 4
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:8'1 ? possible intended match
# | 10: ret void
# | next:8'0 ~~~~~~~~~~
# | 11: }
# | next:8'0 ~~
# | 12:
# | next:8'0 ~
# | 13: define i32 @test_ret_attr_keep(i32 %x) {
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 14: entry:
# | next:26'0 X error: no match found
# | 15: %0 = call range(i32 0, 10) i32 asm "mov $0, $1", "=r,rm"(i32 %x)
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:26'1 ? possible intended match
# | 16: ret i32 %0
# | next:26'0 ~~~~~~~~~~~~
# | 17: }
# | next:26'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/inline-asm-prepare-bundles.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-bundles.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-bundles.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-bundles.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-bundles.ll:8:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:7:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:8:2: note: possible intended match here
# | %0 = call i32 asm sideeffect "mov $1, $0", "=r,rm"(i32 %x) [ "bundle"(i32 42) ]
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-bundles.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: define i32 @test_bundle(i32 %x) {
# | 7: entry:
# | next:8'0 X error: no match found
# | 8: %0 = call i32 asm sideeffect "mov $1, $0", "=r,rm"(i32 %x) [ "bundle"(i32 42) ]
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:8'1 ? possible intended match
# | 9: ret i32 %0
# | next:8'0 ~~~~~~~~~~~~
# | 10: }
# | next:8'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/inline-asm-prepare-callbase.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll:10:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:9:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:10:2: note: possible intended match here
# | %0 = invoke i32 asm "mov $0, $1", "=r,rm"(i32 %x)
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll:40:108: error: undefined variable: ATTR1
# | ; CHECK-NEXT: [[TMP0:%.*]] = callbr i32 asm "mov $1, $0", "=r,*rm,!i"(ptr elementtype(i32) [[ASM_MEM]]) #[[ATTR1]]
# | ^
# | <stdin>:25:37: note: with "ASM_MEM" equal to "%asm_mem"
# | store i32 %x, ptr %asm_mem, align 4
# | ^
# | <stdin>:26:2: note: possible intended match here
# | %0 = callbr i32 asm "mov $1, $0", "=r,*rm,!i"(ptr elementtype(i32) %asm_mem) #1
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll:66:131: error: undefined variable: ATTR1
# | ; CHECK-NEXT: callbr void asm "mov $1, $0", "=*rm,*rm,!i"(ptr elementtype(i32) [[ASM_MEM]], ptr elementtype(i32) [[ASM_MEM1]]) #[[ATTR1]]
# | ^
# | <stdin>:41:38: note: with "ASM_MEM" equal to "%asm_mem"
# | store i32 %x, ptr %asm_mem1, align 4
# | ^
# | <stdin>:41:38: note: with "ASM_MEM1" equal to "%asm_mem1"
# | store i32 %x, ptr %asm_mem1, align 4
# | ^
# | <stdin>:42:2: note: possible intended match here
# | callbr void asm "mov $1, $0", "=*rm,*rm,!i"(ptr elementtype(i32) %asm_mem, ptr elementtype(i32) %asm_mem1) #1
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-callbase.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: declare i32 @__gxx_personality_v0(...)
# | 7:
# | 8: define i32 @test_invoke_rm(i32 %x) personality ptr @__gxx_personality_v0 {
# | 9: entry:
# | next:10'0 X error: no match found
# | 10: %0 = invoke i32 asm "mov $0, $1", "=r,rm"(i32 %x)
# | next:10'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:10'1 ? possible intended match
# | 11: to label %normal unwind label %unwind
# | next:10'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12:
# | next:10'0 ~
# | 13: normal: ; preds = %entry
# | next:10'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 14: ret i32 %0
# | next:10'0 ~~~~~~~~~~~~
# | 15:
# | next:10'0 ~
# | .
# | .
# | .
# | 20: }
# | next:10'0 ~~
# | 21:
# | next:10'0 ~
# | 22: define i32 @test_callbr_rm(i32 %x) {
# | next:10'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: entry:
# | 24: %asm_mem = alloca i32, align 4
# | 25: store i32 %x, ptr %asm_mem, align 4
# | next:40'0 X error: match failed for invalid pattern
# | next:40'1 undefined variable: ATTR1
# | next:40'2 with "ASM_MEM" equal to "%asm_mem"
# | 26: %0 = callbr i32 asm "mov $1, $0", "=r,*rm,!i"(ptr elementtype(i32) %asm_mem) #1
# | next:40'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:40'3 ? possible intended match
# | 27: to label %normal [label %indirect]
# | next:40'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 28:
# | next:40'0 ~
# | 29: normal: ; preds = %entry
# | next:40'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 30: ret i32 %0
# | next:40'0 ~~~~~~~~~~~~
# | 31:
# | next:40'0 ~
# | .
# | .
# | .
# | 36:
# | next:40'0 ~
# | 37: define i32 @test_callbr_convert(i32 %x) {
# | next:40'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 38: entry:
# | 39: %asm_mem = alloca i32, align 4
# | 40: %asm_mem1 = alloca i32, align 4
# | 41: store i32 %x, ptr %asm_mem1, align 4
# | next:66'0 X error: match failed for invalid pattern
# | next:66'1 undefined variable: ATTR1
# | next:66'2 with "ASM_MEM" equal to "%asm_mem"
# | next:66'3 with "ASM_MEM1" equal to "%asm_mem1"
# | 42: callbr void asm "mov $1, $0", "=*rm,*rm,!i"(ptr elementtype(i32) %asm_mem, ptr elementtype(i32) %asm_mem1) #1
# | next:66'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:66'4 ? possible intended match
# | 43: to label %normal [label %indirect]
# | next:66'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 44:
# | next:66'0 ~
# | 45: normal: ; preds = %entry
# | next:66'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 46: %0 = load i32, ptr %asm_mem, align 4
# | next:66'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 47: ret i32 %0
# | next:66'0 ~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/inline-asm-prepare-memory.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=x86_64-unknown-linux-gnu -inline-asm-prepare
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll:8:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:7:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:8:2: note: possible intended match here
# | %0 = call i32 asm sideeffect "mov $1, $0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %x)
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll:22:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:13:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:15:12: note: possible intended match here
# | store i32 %0, ptr %p, align 4
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll:67:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ASM_MEM:%.*]] = alloca i32, align 4
# | ^
# | <stdin>:34:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:37:12: note: possible intended match here
# | store i32 %0, ptr %x_ptr, align 4
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/inline-asm-prepare-memory.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: define void @test1(i32 %x) {
# | 7: entry:
# | next:8'0 X error: no match found
# | 8: %0 = call i32 asm sideeffect "mov $1, $0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %x)
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:8'1 ? possible intended match
# | 9: ret void
# | next:8'0 ~~~~~~~~~~
# | 10: }
# | next:8'0 ~~
# | 11:
# | next:8'0 ~
# | 12: define void @test2(ptr %p) {
# | next:8'0 ~~~~~~~~~~~~~~~~~~~
# | 13: entry:
# | next:22'0 X error: no match found
# | 14: %0 = call i32 asm sideeffect "mov $1, $0", "=rm,~{dirflag},~{fpsr},~{flags}"()
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 15: store i32 %0, ptr %p, align 4
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:22'1 ? possible intended match
# | 16: ret void
# | next:22'0 ~~~~~~~~~~
# | 17: }
# | next:22'0 ~~
# | 18:
# | next:22'0 ~
# | 19: define void @test3(ptr %x_ptr) {
# | next:22'0 ~~~~~~~~~~~~~~~~~~~
# | 20: entry:
# | .
# | .
# | .
# | 29: %0 = tail call i64 asm "movq $1, $0", "=r,irm,~{dirflag},~{fpsr},~{flags}"(i32 256)
# | 30: ret i64 %0
# | 31: }
# | 32:
# | 33: define void @test5(ptr %x_ptr, i32 %b) {
# | 34: entry:
# | next:67'0 X error: no match found
# | 35: %x = load i32, ptr %x_ptr, align 4
# | next:67'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 36: %0 = call i32 asm sideeffect "add $1, $0", "=rm,rm,0,~{dirflag},~{fpsr},~{flags}"(i32 %b, i32 %x)
# | next:67'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 37: store i32 %0, ptr %x_ptr, align 4
# | next:67'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:67'1 ? possible intended match
# | 38: ret void
# | next:67'0 ~~~~~~~~~~
# | 39: }
# | next:67'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</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/181973
More information about the cfe-commits
mailing list