Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td =================================================================== --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td @@ -25,19 +25,19 @@ [(WebAssemblycallseq_end timm:$amt, undef)]>; } // isCodeGenOnly = 1 -multiclass CALL { +multiclass CALL { def CALL_#vt : I<(outs vt:$dst), (ins i32imm:$callee, variable_ops), [(set vt:$dst, (WebAssemblycall1 (i32 imm:$callee)))], - "call \t$dst, $callee">; + !strconcat(prefix, "call\t$dst, $callee")>; def CALL_INDIRECT_#vt : I<(outs vt:$dst), (ins I32:$callee, variable_ops), [(set vt:$dst, (WebAssemblycall1 I32:$callee))], - "call_indirect\t$dst, $callee">; + !strconcat(prefix, "call_indirect\t$dst, $callee")>; } let Uses = [SP32, SP64], isCall = 1 in { - defm : CALL; - defm : CALL; - defm : CALL; - defm : CALL; + defm : CALL; + defm : CALL; + defm : CALL; + defm : CALL; def CALL_VOID : I<(outs), (ins i32imm:$callee, variable_ops), [(WebAssemblycall0 (i32 imm:$callee))], Index: llvm/trunk/test/CodeGen/WebAssembly/call.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/call.ll +++ llvm/trunk/test/CodeGen/WebAssembly/call.ll @@ -15,7 +15,7 @@ ; CHECK-LABEL: call_i32_nullary: ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, i32_nullary{{$}} +; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_nullary{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define i32 @call_i32_nullary() { %r = call i32 @i32_nullary() @@ -24,7 +24,7 @@ ; CHECK-LABEL: call_i64_nullary: ; CHECK-NEXT: .result i64{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, i64_nullary{{$}} +; CHECK-NEXT: {{^}} i64.call $push[[NUM:[0-9]+]]=, i64_nullary{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define i64 @call_i64_nullary() { %r = call i64 @i64_nullary() @@ -33,7 +33,7 @@ ; CHECK-LABEL: call_float_nullary: ; CHECK-NEXT: .result f32{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, float_nullary{{$}} +; CHECK-NEXT: {{^}} f32.call $push[[NUM:[0-9]+]]=, float_nullary{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define float @call_float_nullary() { %r = call float @float_nullary() @@ -42,7 +42,7 @@ ; CHECK-LABEL: call_double_nullary: ; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, double_nullary{{$}} +; CHECK-NEXT: {{^}} f64.call $push[[NUM:[0-9]+]]=, double_nullary{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define double @call_double_nullary() { %r = call double @double_nullary() @@ -50,7 +50,7 @@ } ; CHECK-LABEL: call_void_nullary: -; CHECK-NEXT: call void_nullary{{$}} +; CHECK-NEXT: {{^}} call void_nullary{{$}} ; CHECK-NEXT: return{{$}} define void @call_void_nullary() { call void @void_nullary() @@ -60,7 +60,7 @@ ; CHECK-LABEL: call_i32_unary: ; CHECK-NEXT: .param i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, i32_unary, $0{{$}} +; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_unary, $0{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define i32 @call_i32_unary(i32 %a) { %r = call i32 @i32_unary(i32 %a) @@ -70,7 +70,7 @@ ; CHECK-LABEL: call_i32_binary: ; CHECK-NEXT: .param i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: call $push[[NUM:[0-9]+]]=, i32_binary, $0, $1{{$}} +; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_binary, $0, $1{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define i32 @call_i32_binary(i32 %a, i32 %b) { %r = call i32 @i32_binary(i32 %a, i32 %b) @@ -79,7 +79,7 @@ ; CHECK-LABEL: call_indirect_void: ; CHECK-NEXT: .param i32{{$}} -; CHECK-NEXT: call_indirect $0{{$}} +; CHECK-NEXT: {{^}} call_indirect $0{{$}} ; CHECK-NEXT: return{{$}} define void @call_indirect_void(void ()* %callee) { call void %callee() @@ -89,7 +89,7 @@ ; CHECK-LABEL: call_indirect_i32: ; CHECK-NEXT: .param i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: call_indirect $push[[NUM:[0-9]+]]=, $0{{$}} +; CHECK-NEXT: {{^}} i32.call_indirect $push[[NUM:[0-9]+]]=, $0{{$}} ; CHECK-NEXT: return $pop[[NUM]]{{$}} define i32 @call_indirect_i32(i32 ()* %callee) { %t = call i32 %callee() @@ -97,7 +97,7 @@ } ; CHECK-LABEL: tail_call_void_nullary: -; CHECK-NEXT: call void_nullary{{$}} +; CHECK-NEXT: {{^}} call void_nullary{{$}} ; CHECK-NEXT: return{{$}} define void @tail_call_void_nullary() { tail call void @void_nullary() @@ -105,7 +105,7 @@ } ; CHECK-LABEL: fastcc_tail_call_void_nullary: -; CHECK-NEXT: call void_nullary{{$}} +; CHECK-NEXT: {{^}} call void_nullary{{$}} ; CHECK-NEXT: return{{$}} define void @fastcc_tail_call_void_nullary() { tail call fastcc void @void_nullary() @@ -113,7 +113,7 @@ } ; CHECK-LABEL: coldcc_tail_call_void_nullary: -; CHECK-NEXT: call void_nullary +; CHECK-NEXT: {{^}} call void_nullary ; CHECK-NEXT: return{{$}} define void @coldcc_tail_call_void_nullary() { tail call coldcc void @void_nullary() Index: llvm/trunk/test/CodeGen/WebAssembly/f32.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/f32.ll +++ llvm/trunk/test/CodeGen/WebAssembly/f32.ll @@ -146,7 +146,7 @@ } ; CHECK-LABEL: fma32: -; CHECK: call $push0=, fmaf, $0, $1, $2{{$}} +; CHECK: {{^}} f32.call $push0=, fmaf, $0, $1, $2{{$}} ; CHECK-NEXT: return $pop0{{$}} define float @fma32(float %a, float %b, float %c) { %d = call float @llvm.fma.f32(float %a, float %b, float %c) Index: llvm/trunk/test/CodeGen/WebAssembly/f64.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/f64.ll +++ llvm/trunk/test/CodeGen/WebAssembly/f64.ll @@ -146,7 +146,7 @@ } ; CHECK-LABEL: fma64: -; CHECK: call $push0=, fma, $0, $1, $2{{$}} +; CHECK: {{^}} f64.call $push0=, fma, $0, $1, $2{{$}} ; CHECK-NEXT: return $pop0{{$}} define double @fma64(double %a, double %b, double %c) { %d = call double @llvm.fma.f64(double %a, double %b, double %c) Index: llvm/trunk/test/CodeGen/WebAssembly/frem.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/frem.ll +++ llvm/trunk/test/CodeGen/WebAssembly/frem.ll @@ -8,7 +8,7 @@ ; CHECK-LABEL: frem32: ; CHECK-NEXT: .param f32, f32{{$}} ; CHECK-NEXT: .result f32{{$}} -; CHECK-NEXT: call $push0=, fmodf, $0, $1{{$}} +; CHECK-NEXT: {{^}} f32.call $push0=, fmodf, $0, $1{{$}} ; CHECK-NEXT: return $pop0{{$}} define float @frem32(float %x, float %y) { %a = frem float %x, %y @@ -18,7 +18,7 @@ ; CHECK-LABEL: frem64: ; CHECK-NEXT: .param f64, f64{{$}} ; CHECK-NEXT: .result f64{{$}} -; CHECK-NEXT: call $push0=, fmod, $0, $1{{$}} +; CHECK-NEXT: {{^}} f64.call $push0=, fmod, $0, $1{{$}} ; CHECK-NEXT: return $pop0{{$}} define double @frem64(double %x, double %y) { %a = frem double %x, %y Index: llvm/trunk/test/CodeGen/WebAssembly/returned.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/returned.ll +++ llvm/trunk/test/CodeGen/WebAssembly/returned.ll @@ -8,8 +8,8 @@ ; CHECK-LABEL: _Z3foov: ; CHECK-NEXT: .result i32{{$}} ; CHECK-NEXT: i32.const $push0=, 1{{$}} -; CHECK-NEXT: call $push1=, _Znwm, $pop0{{$}} -; CHECK-NEXT: call $push2=, _ZN5AppleC1Ev, $pop1{{$}} +; CHECK-NEXT: {{^}} i32.call $push1=, _Znwm, $pop0{{$}} +; CHECK-NEXT: {{^}} i32.call $push2=, _ZN5AppleC1Ev, $pop1{{$}} ; CHECK-NEXT: return $pop2{{$}} %class.Apple = type { i8 } declare noalias i8* @_Znwm(i32) @@ -25,7 +25,7 @@ ; CHECK-LABEL: _Z3barPvS_l: ; CHECK-NEXT: .param i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} -; CHECK-NEXT: call $push0=, memcpy, $0, $1, $2{{$}} +; CHECK-NEXT: {{^}} i32.call $push0=, memcpy, $0, $1, $2{{$}} ; CHECK-NEXT: return $pop0{{$}} declare i8* @memcpy(i8* returned, i8*, i32) define i8* @_Z3barPvS_l(i8* %p, i8* %s, i32 %n) { @@ -38,7 +38,7 @@ ; CHECK-LABEL: test_constant_arg: ; CHECK-NEXT: i32.const $push0=, global{{$}} -; CHECK-NEXT: call $discard=, returns_arg, $pop0{{$}} +; CHECK-NEXT: {{^}} i32.call $discard=, returns_arg, $pop0{{$}} ; CHECK-NEXT: return{{$}} @global = external global i32 @addr = global i32* @global Index: llvm/trunk/test/CodeGen/WebAssembly/unused-argument.ll =================================================================== --- llvm/trunk/test/CodeGen/WebAssembly/unused-argument.ll +++ llvm/trunk/test/CodeGen/WebAssembly/unused-argument.ll @@ -22,7 +22,7 @@ } ; CHECK-LABEL: call_something: -; CHECK-NEXT: call $discard=, return_something{{$}} +; CHECK-NEXT: {{^}} i32.call $discard=, return_something{{$}} ; CHECK-NEXT: return{{$}} declare i32 @return_something() define void @call_something() {