Skip to content

Commit 4ffeb79

Browse files
committed
fix tests
1 parent 2a3f542 commit 4ffeb79

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ bool InlineAsmLowering::lowerInlineAsm(
235235
const auto ConstraintError = [&](const GISelAsmOperandInfo &Info, Twine Msg) {
236236
LLVMContext &Ctx = MIRBuilder.getContext();
237237
Ctx.diagnose(DiagnosticInfoInlineAsm(
238-
Call, "invalid constraint '" + Info.ConstraintCode + "' in '" +
239-
MF.getName() + "': " + Msg));
238+
Call, "invalid constraint '" + Info.ConstraintCode + "': " + Msg));
240239
// TODO: Recover if fallback isn't used. Otherwise let the fallback to DAG
241240
// kick in.
242241
return false;
Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1-
; RUN: llc -S -mtriple=amdgcn -mcpu=fiji -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' %s -o - 2> %t.err
1+
; RUN: not llc -mtriple=amdgcn -mcpu=fiji -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' %s -o - 2>&1 | FileCheck %s
22

3-
; CHECK: error: invalid constraint '' in 'aggregates': aggregate input operands not supported yet
3+
; CHECK: error: invalid constraint '': aggregate input operands not supported yet
44
define amdgpu_kernel void @aggregates([4 x i8] %val) {
55
tail call void asm sideeffect "s_nop", "r"([4 x i8] %val)
66
ret void
77
}
88

9-
; CHECK: error: error: invalid constraint '{s999}' in 'bad_output': could not allocate output register for constraint
9+
; CHECK: error: invalid constraint '{s999}': could not allocate output register for constraint
1010
define amdgpu_kernel void @bad_output() {
1111
tail call i32 asm sideeffect "s_nop", "={s999}"()
1212
ret void
1313
}
14+
15+
; CHECK: error: invalid constraint '{s998}': could not allocate input register for register constraint
16+
define amdgpu_kernel void @bad_input() {
17+
tail call void asm sideeffect "s_nop", "{s998}"(i32 undef)
18+
ret void
19+
}
20+
; CHECK: error: invalid constraint '{s997}': indirect register inputs are not supported yet
21+
define amdgpu_kernel void @indirect_input() {
22+
tail call void asm sideeffect "s_nop", "*{s997}"(ptr elementtype(i32) undef)
23+
ret void
24+
}
25+
26+
; CHECK: error: invalid constraint 'i': unsupported constraint
27+
define amdgpu_kernel void @badimm() {
28+
tail call void asm sideeffect "s_nop", "i"(i32 undef)
29+
ret
30+
void
31+
}

0 commit comments

Comments
 (0)