[WebAssembly] Update CodeGen test expectations after rL354697. NFC
llvm-svn: 354705
This commit is contained in:
parent
81c0880c99
commit
275d15ecf3
|
@ -21,24 +21,24 @@ declare void @ext_byval_func_empty(%EmptyStruct* byval)
|
|||
define void @byval_arg(%SmallStruct* %ptr) {
|
||||
; CHECK: .functype byval_arg (i32) -> ()
|
||||
; Subtract 16 from SP (SP is 16-byte aligned)
|
||||
; CHECK-NEXT: global.get $push[[L2:.+]]=, __stack_pointer@GLOBAL
|
||||
; CHECK-NEXT: global.get $push[[L2:.+]]=, __stack_pointer
|
||||
; CHECK-NEXT: i32.const $push[[L3:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L11:.+]]=, $pop[[L2]], $pop[[L3]]
|
||||
; Ensure SP is stored back before the call
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, $[[SP:.+]]=, $pop[[L11]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L10]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L10]]{{$}}
|
||||
; Copy the SmallStruct argument to the stack (SP+12, original SP-4)
|
||||
; CHECK-NEXT: i32.load $push[[L0:.+]]=, 0($0)
|
||||
; CHECK-NEXT: i32.store 12($[[SP]]), $pop[[L0]]
|
||||
; Pass a pointer to the stack slot to the function
|
||||
; CHECK-NEXT: i32.const $push[[L5:.+]]=, 12{{$}}
|
||||
; CHECK-NEXT: i32.add $push[[ARG:.+]]=, $[[SP]], $pop[[L5]]{{$}}
|
||||
; CHECK-NEXT: call ext_byval_func@FUNCTION, $pop[[ARG]]{{$}}
|
||||
; CHECK-NEXT: call ext_byval_func, $pop[[ARG]]{{$}}
|
||||
call void @ext_byval_func(%SmallStruct* byval %ptr)
|
||||
; Restore the stack
|
||||
; CHECK-NEXT: i32.const $push[[L6:.+]]=, 16
|
||||
; CHECK-NEXT: i32.add $push[[L8:.+]]=, $[[SP]], $pop[[L6]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L8]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L8]]
|
||||
; CHECK-NEXT: return
|
||||
ret void
|
||||
}
|
||||
|
@ -50,14 +50,14 @@ define void @byval_arg_align8(%SmallStruct* %ptr) {
|
|||
; CHECK: i32.const $push[[L1:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L11:.+]]=, {{.+}}, $pop[[L1]]
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, $[[SP:.+]]=, $pop[[L11]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L10]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L10]]{{$}}
|
||||
; Copy the SmallStruct argument to the stack (SP+8, original SP-8)
|
||||
; CHECK-NEXT: i32.load $push[[L0:.+]]=, 0($0){{$}}
|
||||
; CHECK-NEXT: i32.store 8($[[SP]]), $pop[[L0]]{{$}}
|
||||
; Pass a pointer to the stack slot to the function
|
||||
; CHECK-NEXT: i32.const $push[[L5:.+]]=, 8{{$}}
|
||||
; CHECK-NEXT: i32.add $push[[ARG:.+]]=, $[[SP]], $pop[[L5]]{{$}}
|
||||
; CHECK-NEXT: call ext_byval_func_align8@FUNCTION, $pop[[ARG]]{{$}}
|
||||
; CHECK-NEXT: call ext_byval_func_align8, $pop[[ARG]]{{$}}
|
||||
call void @ext_byval_func_align8(%SmallStruct* byval align 8 %ptr)
|
||||
ret void
|
||||
}
|
||||
|
@ -69,13 +69,13 @@ define void @byval_arg_double(%AlignedStruct* %ptr) {
|
|||
; CHECK: i32.const $push[[L1:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L14:.+]]=, {{.+}}, $pop[[L1]]
|
||||
; CHECK-NEXT: local.tee $push[[L13:.+]]=, $[[SP:.+]]=, $pop[[L14]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L13]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L13]]
|
||||
; Copy the AlignedStruct argument to the stack (SP+0, original SP-16)
|
||||
; Just check the last load/store pair of the memcpy
|
||||
; CHECK: i64.load $push[[L4:.+]]=, 0($0)
|
||||
; CHECK-NEXT: i64.store 0($[[SP]]), $pop[[L4]]
|
||||
; Pass a pointer to the stack slot to the function
|
||||
; CHECK-NEXT: call ext_byval_func_alignedstruct@FUNCTION, $[[SP]]
|
||||
; CHECK-NEXT: call ext_byval_func_alignedstruct, $[[SP]]
|
||||
tail call void @ext_byval_func_alignedstruct(%AlignedStruct* byval %ptr)
|
||||
ret void
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ define void @byval_arg_double(%AlignedStruct* %ptr) {
|
|||
define void @byval_param(%SmallStruct* byval align 32 %ptr) {
|
||||
; CHECK: .functype byval_param (i32) -> ()
|
||||
; %ptr is just a pointer to a struct, so pass it directly through
|
||||
; CHECK: call ext_func@FUNCTION, $0
|
||||
; CHECK: call ext_func, $0
|
||||
call void @ext_func(%SmallStruct* %ptr)
|
||||
ret void
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ define void @byval_param(%SmallStruct* byval align 32 %ptr) {
|
|||
; CHECK-LABEL: byval_empty_caller
|
||||
define void @byval_empty_caller(%EmptyStruct* %ptr) {
|
||||
; CHECK: .functype byval_empty_caller (i32) -> ()
|
||||
; CHECK: call ext_byval_func_empty@FUNCTION, $0
|
||||
; CHECK: call ext_byval_func_empty, $0
|
||||
call void @ext_byval_func_empty(%EmptyStruct* byval %ptr)
|
||||
ret void
|
||||
}
|
||||
|
@ -100,22 +100,22 @@ define void @byval_empty_caller(%EmptyStruct* %ptr) {
|
|||
; CHECK-LABEL: byval_empty_callee
|
||||
define void @byval_empty_callee(%EmptyStruct* byval %ptr) {
|
||||
; CHECK: .functype byval_empty_callee (i32) -> ()
|
||||
; CHECK: call ext_func_empty@FUNCTION, $0
|
||||
; CHECK: call ext_func_empty, $0
|
||||
call void @ext_func_empty(%EmptyStruct* %ptr)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Call memcpy for "big" byvals.
|
||||
; CHECK-LABEL: big_byval:
|
||||
; CHECK: global.get $push[[L2:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L2:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L3:.+]]=, 131072
|
||||
; CHECK-NEXT: i32.sub $push[[L11:.+]]=, $pop[[L2]], $pop[[L3]]
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, $[[SP:.+]]=, $pop[[L11]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L10]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L10]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L0:.+]]=, 131072
|
||||
; CHECK-NEXT: i32.call $push[[L11:.+]]=, memcpy@FUNCTION, $[[SP]], ${{.+}}, $pop{{.+}}
|
||||
; CHECK-NEXT: i32.call $push[[L11:.+]]=, memcpy, $[[SP]], ${{.+}}, $pop{{.+}}
|
||||
; CHECK-NEXT: local.tee $push[[L9:.+]]=, $[[SP:.+]]=, $pop[[L11]]{{$}}
|
||||
; CHECK-NEXT: call big_byval_callee@FUNCTION,
|
||||
; CHECK-NEXT: call big_byval_callee,
|
||||
%big = type [131072 x i8]
|
||||
declare void @big_byval_callee(%big* byval align 1)
|
||||
define void @big_byval(%big* byval align 1 %x) {
|
||||
|
|
|
@ -17,7 +17,7 @@ declare void @void_nullary()
|
|||
|
||||
; CHECK-LABEL: call_i32_nullary:
|
||||
; CHECK-NEXT: .functype call_i32_nullary () -> (i32){{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_nullary@FUNCTION{{$}}
|
||||
; 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()
|
||||
|
@ -26,7 +26,7 @@ define i32 @call_i32_nullary() {
|
|||
|
||||
; CHECK-LABEL: call_i64_nullary:
|
||||
; CHECK-NEXT: .functype call_i64_nullary () -> (i64){{$}}
|
||||
; CHECK-NEXT: {{^}} i64.call $push[[NUM:[0-9]+]]=, i64_nullary@FUNCTION{{$}}
|
||||
; 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()
|
||||
|
@ -35,7 +35,7 @@ define i64 @call_i64_nullary() {
|
|||
|
||||
; CHECK-LABEL: call_float_nullary:
|
||||
; CHECK-NEXT: .functype call_float_nullary () -> (f32){{$}}
|
||||
; CHECK-NEXT: {{^}} f32.call $push[[NUM:[0-9]+]]=, float_nullary@FUNCTION{{$}}
|
||||
; 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()
|
||||
|
@ -44,7 +44,7 @@ define float @call_float_nullary() {
|
|||
|
||||
; CHECK-LABEL: call_double_nullary:
|
||||
; CHECK-NEXT: .functype call_double_nullary () -> (f64){{$}}
|
||||
; CHECK-NEXT: {{^}} f64.call $push[[NUM:[0-9]+]]=, double_nullary@FUNCTION{{$}}
|
||||
; 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()
|
||||
|
@ -53,7 +53,7 @@ define double @call_double_nullary() {
|
|||
|
||||
; CHECK-LABEL: call_v128_nullary:
|
||||
; CHECK-NEXT: .functype call_v128_nullary () -> (v128){{$}}
|
||||
; CHECK-NEXT: {{^}} v128.call $push[[NUM:[0-9]+]]=, v128_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: {{^}} v128.call $push[[NUM:[0-9]+]]=, v128_nullary{{$}}
|
||||
; CHECK-NEXT: return $pop[[NUM]]{{$}}
|
||||
define <16 x i8> @call_v128_nullary() {
|
||||
%r = call <16 x i8> @v128_nullary()
|
||||
|
@ -62,7 +62,7 @@ define <16 x i8> @call_v128_nullary() {
|
|||
|
||||
; CHECK-LABEL: call_void_nullary:
|
||||
; CHECK-NEXT: .functype call_void_nullary () -> (){{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @call_void_nullary() {
|
||||
call void @void_nullary()
|
||||
|
@ -72,7 +72,7 @@ define void @call_void_nullary() {
|
|||
; CHECK-LABEL: call_i32_unary:
|
||||
; CHECK-NEXT: .functype call_i32_unary (i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_unary@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_unary, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: return $pop[[NUM]]{{$}}
|
||||
define i32 @call_i32_unary(i32 %a) {
|
||||
%r = call i32 @i32_unary(i32 %a)
|
||||
|
@ -83,7 +83,7 @@ define i32 @call_i32_unary(i32 %a) {
|
|||
; CHECK-NEXT: .functype call_i32_binary (i32, i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: local.get $push[[L1:[0-9]+]]=, 1{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_binary@FUNCTION, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push[[NUM:[0-9]+]]=, i32_binary, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: return $pop[[NUM]]{{$}}
|
||||
define i32 @call_i32_binary(i32 %a, i32 %b) {
|
||||
%r = call i32 @i32_binary(i32 %a, i32 %b)
|
||||
|
@ -176,7 +176,7 @@ define void @call_indirect_arg_2(i32 (i32, i32)* %callee, i32 %arg, i32 %arg2) {
|
|||
|
||||
; CHECK-LABEL: tail_call_void_nullary:
|
||||
; CHECK-NEXT: .functype tail_call_void_nullary () -> (){{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @tail_call_void_nullary() {
|
||||
tail call void @void_nullary()
|
||||
|
@ -185,7 +185,7 @@ define void @tail_call_void_nullary() {
|
|||
|
||||
; CHECK-LABEL: fastcc_tail_call_void_nullary:
|
||||
; CHECK-NEXT: .functype fastcc_tail_call_void_nullary () -> (){{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @fastcc_tail_call_void_nullary() {
|
||||
tail call fastcc void @void_nullary()
|
||||
|
@ -194,7 +194,7 @@ define void @fastcc_tail_call_void_nullary() {
|
|||
|
||||
; CHECK-LABEL: coldcc_tail_call_void_nullary:
|
||||
; CHECK-NEXT: .functype coldcc_tail_call_void_nullary () -> (){{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: {{^}} call void_nullary{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @coldcc_tail_call_void_nullary() {
|
||||
tail call coldcc void @void_nullary()
|
||||
|
@ -205,9 +205,9 @@ define void @coldcc_tail_call_void_nullary() {
|
|||
; CHECK-NEXT: .functype call_constexpr () -> (){{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, 2{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, 3{{$}}
|
||||
; CHECK-NEXT: call .Lvararg_func_bitcast@FUNCTION, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: call other_void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call void_nullary@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call .Lvararg_func_bitcast, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: call other_void_nullary{{$}}
|
||||
; CHECK-NEXT: call void_nullary{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
declare void @vararg_func(...)
|
||||
declare void @other_void_nullary()
|
||||
|
|
|
@ -18,13 +18,13 @@ target triple = "wasm32-unknown-unknown"
|
|||
|
||||
; CHECK-LABEL: test0
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch $[[EXCEPT_REF:[0-9]+]]=
|
||||
; CHECK: block i32
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT, $[[EXCEPT_REF]]
|
||||
; CHECK: br_on_exn 0, __cpp_exception, $[[EXCEPT_REF]]
|
||||
; CHECK: rethrow
|
||||
; CHECK: end_block
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality@FUNCTION
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality
|
||||
; CHECK: end_try
|
||||
; CHECK: return
|
||||
define void @test0() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
|
@ -86,21 +86,21 @@ try.cont: ; preds = %entry, %catch, %cat
|
|||
|
||||
; CHECK-LABEL: test1
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT
|
||||
; CHECK: br_on_exn 0, __cpp_exception
|
||||
; CHECK: rethrow
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality@FUNCTION
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT
|
||||
; CHECK: br_on_exn 0, __cpp_exception
|
||||
; CHECK: rethrow
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality@FUNCTION
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality
|
||||
; CHECK: try
|
||||
; CHECK: i32.call $drop=, __cxa_begin_catch@FUNCTION
|
||||
; CHECK: i32.call $drop=, __cxa_begin_catch
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch $drop=
|
||||
; CHECK: rethrow
|
||||
; CHECK: end_try
|
||||
|
@ -196,21 +196,21 @@ unreachable: ; preds = %rethrow5
|
|||
|
||||
; CHECK-LABEL: test2
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT
|
||||
; CHECK: br_on_exn 0, __cpp_exception
|
||||
; CHECK: rethrow
|
||||
; CHECK: loop
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch $drop=
|
||||
; CHECK: try
|
||||
; CHECK: call __cxa_end_catch@FUNCTION
|
||||
; CHECK: call __cxa_end_catch
|
||||
; CHECK: catch
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT
|
||||
; CHECK: call __clang_call_terminate@FUNCTION, 0
|
||||
; CHECK: br_on_exn 0, __cpp_exception
|
||||
; CHECK: call __clang_call_terminate, 0
|
||||
; CHECK: unreachable
|
||||
; CHECK: call __clang_call_terminate@FUNCTION
|
||||
; CHECK: call __clang_call_terminate
|
||||
; CHECK: unreachable
|
||||
; CHECK: end_try
|
||||
; CHECK: rethrow
|
||||
|
|
|
@ -1286,7 +1286,7 @@ bb50:
|
|||
; OPT-NEXT: i32.const $push
|
||||
; OPT-NEXT: i32.eqz $push{{.*}}=, $pop{{.*}}{{$}}
|
||||
; OPT-NEXT: br_if 0, $pop{{.*}}{{$}}
|
||||
; OPT-NEXT: call test15_callee1@FUNCTION{{$}}
|
||||
; OPT-NEXT: call test15_callee1{{$}}
|
||||
; OPT-NEXT: br 1{{$}}
|
||||
; OPT-NEXT: .LBB24_2:
|
||||
; OPT-NEXT: end_block
|
||||
|
|
|
@ -10,7 +10,7 @@ target triple = "wasm32-unknown-unknown"
|
|||
@_ZTIi = external constant i8*
|
||||
|
||||
; CHECK-LABEL: test_throw:
|
||||
; CHECK: throw __cpp_exception@EVENT, $0
|
||||
; CHECK: throw __cpp_exception, $0
|
||||
; CHECK-NOT: unreachable
|
||||
define void @test_throw(i8* %p) {
|
||||
call void @llvm.wasm.throw(i32 0, i8* %p)
|
||||
|
@ -26,22 +26,22 @@ define void @test_rethrow(i8* %p) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: test_catch_rethrow:
|
||||
; CHECK: global.get ${{.+}}=, __stack_pointer@GLOBAL
|
||||
; CHECK: global.get ${{.+}}=, __stack_pointer
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch $[[EXCEPT_REF:[0-9]+]]=
|
||||
; CHECK: global.set __stack_pointer@GLOBAL
|
||||
; CHECK: global.set __stack_pointer
|
||||
; CHECK: block i32
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT, $[[EXCEPT_REF]]
|
||||
; CHECK: br_on_exn 0, __cpp_exception, $[[EXCEPT_REF]]
|
||||
; CHECK: rethrow
|
||||
; CHECK: end_block
|
||||
; CHECK: extract_exception $[[EXN:[0-9]+]]=
|
||||
; CHECK-DAG: i32.store __wasm_lpad_context
|
||||
; CHECK-DAG: i32.store __wasm_lpad_context+4
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality@FUNCTION, $[[EXN]]
|
||||
; CHECK: i32.call $drop=, __cxa_begin_catch@FUNCTION
|
||||
; CHECK: call __cxa_end_catch@FUNCTION
|
||||
; CHECK: call __cxa_rethrow@FUNCTION
|
||||
; CHECK: i32.call $drop=, _Unwind_CallPersonality, $[[EXN]]
|
||||
; CHECK: i32.call $drop=, __cxa_begin_catch
|
||||
; CHECK: call __cxa_end_catch
|
||||
; CHECK: call __cxa_rethrow
|
||||
; CHECK: end_try
|
||||
define void @test_catch_rethrow() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
entry:
|
||||
|
@ -74,10 +74,10 @@ try.cont: ; preds = %entry, %catch
|
|||
|
||||
; CHECK-LABEL: test_cleanup:
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK: global.set __stack_pointer@GLOBAL
|
||||
; CHECK: i32.call $drop=, _ZN7CleanupD1Ev@FUNCTION
|
||||
; CHECK: global.set __stack_pointer
|
||||
; CHECK: i32.call $drop=, _ZN7CleanupD1Ev
|
||||
; CHECK: rethrow
|
||||
; CHECK: end_try
|
||||
define void @test_cleanup() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
|
@ -99,12 +99,12 @@ ehcleanup: ; preds = %entry
|
|||
; CHECK-LABEL: test_terminatepad
|
||||
; CHECK: catch
|
||||
; CHECK: block i32
|
||||
; CHECK: br_on_exn 0, __cpp_exception@EVENT
|
||||
; CHECK: call __clang_call_terminate@FUNCTION, 0
|
||||
; CHECK: br_on_exn 0, __cpp_exception
|
||||
; CHECK: call __clang_call_terminate, 0
|
||||
; CHECK: unreachable
|
||||
; CHECK: end_block
|
||||
; CHECK: extract_exception
|
||||
; CHECK: call __clang_call_terminate@FUNCTION
|
||||
; CHECK: call __clang_call_terminate
|
||||
; CHECK: unreachable
|
||||
define void @test_terminatepad() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
entry:
|
||||
|
@ -152,19 +152,19 @@ terminate: ; preds = %ehcleanup
|
|||
|
||||
; CHECK-LABEL: test_no_prolog_epilog_in_ehpad
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK-NOT: global.get $push{{.+}}=, __stack_pointer@GLOBAL
|
||||
; CHECK: global.set __stack_pointer@GLOBAL
|
||||
; CHECK-NOT: global.get $push{{.+}}=, __stack_pointer
|
||||
; CHECK: global.set __stack_pointer
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: catch
|
||||
; CHECK-NOT: global.get $push{{.+}}=, __stack_pointer@GLOBAL
|
||||
; CHECK: global.set __stack_pointer@GLOBAL
|
||||
; CHECK: call __cxa_end_catch@FUNCTION
|
||||
; CHECK-NOT: global.set __stack_pointer@GLOBAL, $pop{{.+}}
|
||||
; CHECK-NOT: global.get $push{{.+}}=, __stack_pointer
|
||||
; CHECK: global.set __stack_pointer
|
||||
; CHECK: call __cxa_end_catch
|
||||
; CHECK-NOT: global.set __stack_pointer, $pop{{.+}}
|
||||
; CHECK: end_try
|
||||
; CHECK-NOT: global.set __stack_pointer@GLOBAL, $pop{{.+}}
|
||||
; CHECK-NOT: global.set __stack_pointer, $pop{{.+}}
|
||||
; CHECK: end_try
|
||||
define void @test_no_prolog_epilog_in_ehpad() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
entry:
|
||||
|
@ -213,9 +213,9 @@ ehcleanup: ; preds = %catch
|
|||
|
||||
; CHECK-LABEL: no_sp_writeback
|
||||
; CHECK: try
|
||||
; CHECK: call foo@FUNCTION
|
||||
; CHECK: call foo
|
||||
; CHECK: end_try
|
||||
; CHECK-NOT: global.set __stack_pointer@GLOBAL
|
||||
; CHECK-NOT: global.set __stack_pointer
|
||||
; CHECK: return
|
||||
define void @no_sp_writeback() personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*) {
|
||||
entry:
|
||||
|
|
|
@ -9,8 +9,8 @@ target triple = "wasm32-unknown-unknown"
|
|||
; CHECK-LABEL: demote:
|
||||
; CHECK-NEXT: .functype demote (f32) -> (f32){{$}}
|
||||
; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, __gnu_f2h_ieee@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: f32.call $push[[L2:[0-9]+]]=, __gnu_h2f_ieee@FUNCTION, $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, __gnu_f2h_ieee, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: f32.call $push[[L2:[0-9]+]]=, __gnu_h2f_ieee, $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: return $pop[[L2]]{{$}}
|
||||
define half @demote(float %f) {
|
||||
%t = fptrunc float %f to half
|
||||
|
|
|
@ -159,7 +159,7 @@ define float @fmax32_intrinsic(float %x, float %y) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: fma32:
|
||||
; CHECK: {{^}} f32.call $push[[LR:[0-9]+]]=, fmaf@FUNCTION, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: {{^}} f32.call $push[[LR:[0-9]+]]=, fmaf, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK-NEXT: return $pop[[LR]]{{$}}
|
||||
define float @fma32(float %a, float %b, float %c) {
|
||||
%d = call float @llvm.fma.f32(float %a, float %b, float %c)
|
||||
|
|
|
@ -159,7 +159,7 @@ define double @fmax64_intrinsic(double %x, double %y) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: fma64:
|
||||
; CHECK: {{^}} f64.call $push[[LR:[0-9]+]]=, fma@FUNCTION, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: {{^}} f64.call $push[[LR:[0-9]+]]=, fma, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK-NEXT: return $pop[[LR]]{{$}}
|
||||
define double @fma64(double %a, double %b, double %c) {
|
||||
%d = call double @llvm.fma.f64(double %a, double %b, double %c)
|
||||
|
|
|
@ -32,7 +32,7 @@ entry:
|
|||
ret i32 0
|
||||
}
|
||||
|
||||
; CHECK: i32.const {{.*}}, addr@FUNCTION
|
||||
; CHECK: i32.const {{.*}}, addr
|
||||
; CHECK: i32.const {{.*}}, 24
|
||||
; CHECK: i32.shl
|
||||
; CHECK: i32.const {{.*}}, 24
|
||||
|
@ -53,7 +53,7 @@ b:
|
|||
ret i32 0
|
||||
}
|
||||
|
||||
; CHECK: i32.const {{.*}}, addr@FUNCTION
|
||||
; CHECK: i32.const {{.*}}, addr
|
||||
; CHECK: i32.const {{.*}}, 255
|
||||
; CHECK: i32.and
|
||||
; CHECK: i32.const {{.*}}, 64
|
||||
|
@ -72,7 +72,7 @@ b:
|
|||
ret i32 0
|
||||
}
|
||||
|
||||
; CHECK: i32.const {{.*}}, addr@FUNCTION
|
||||
; CHECK: i32.const {{.*}}, addr
|
||||
; CHECK: i32.const {{.*}}, 24
|
||||
; CHECK: i32.shl
|
||||
; CHECK: i32.const {{.*}}, 24
|
||||
|
@ -83,7 +83,7 @@ entry:
|
|||
ret i32 %t
|
||||
}
|
||||
|
||||
; CHECK: i32.const {{.*}}, addr@FUNCTION
|
||||
; CHECK: i32.const {{.*}}, addr
|
||||
; CHECK: i32.const {{.*}}, 255
|
||||
; CHECK: i32.and
|
||||
define hidden i32 @g() #0 {
|
||||
|
|
|
@ -7,7 +7,7 @@ target triple = "wasm32-unknown-unknown"
|
|||
|
||||
; CHECK-LABEL: frem32:
|
||||
; CHECK-NEXT: .functype frem32 (f32, f32) -> (f32){{$}}
|
||||
; CHECK-NEXT: {{^}} f32.call $push0=, fmodf@FUNCTION, $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
|
||||
|
@ -16,7 +16,7 @@ define float @frem32(float %x, float %y) {
|
|||
|
||||
; CHECK-LABEL: frem64:
|
||||
; CHECK-NEXT: .functype frem64 (f64, f64) -> (f64){{$}}
|
||||
; CHECK-NEXT: {{^}} f64.call $push0=, fmod@FUNCTION, $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
|
||||
|
|
|
@ -19,13 +19,13 @@ declare void @specified(i32, i32)
|
|||
; CHECK: callWithArgs:
|
||||
; CHECK: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, 1
|
||||
; CHECK-NEXT: call .Lunderspecified_bitcast@FUNCTION, $pop1, $pop0
|
||||
; CHECK: call .Lspecified_bitcast@FUNCTION, $pop{{[0-9]+$}}
|
||||
; CHECK-NEXT: call .Lunderspecified_bitcast, $pop1, $pop0
|
||||
; CHECK: call .Lspecified_bitcast, $pop{{[0-9]+$}}
|
||||
|
||||
; CHECK: .Lunderspecified_bitcast:
|
||||
; CHECK-NEXT: .functype .Lunderspecified_bitcast (i32, i32) -> (){{$}}
|
||||
; CHECK: call underspecified@FUNCTION, $pop{{[0-9]+$}}
|
||||
; CHECK: call underspecified, $pop{{[0-9]+$}}
|
||||
|
||||
; CHECK: .Lspecified_bitcast:
|
||||
; CHECK-NEXT: .functype .Lspecified_bitcast (i32) -> (){{$}}
|
||||
; CHECK: call specified@FUNCTION, $pop{{[0-9]+}}, $pop{{[0-9]+$}}
|
||||
; CHECK: call specified, $pop{{[0-9]+}}, $pop{{[0-9]+$}}
|
||||
|
|
|
@ -17,21 +17,21 @@ declare void @foo2()
|
|||
declare void @foo3()
|
||||
|
||||
; CHECK-LABEL: test:
|
||||
; CHECK: call .Lhas_i32_arg_bitcast.2@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call .Lhas_i32_arg_bitcast.2@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call .Lhas_i32_ret_bitcast@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.call $drop=, has_i32_ret@FUNCTION
|
||||
; CHECK: call .Lhas_i32_arg_bitcast.2{{$}}
|
||||
; CHECK-NEXT: call .Lhas_i32_arg_bitcast.2{{$}}
|
||||
; CHECK-NEXT: call .Lhas_i32_ret_bitcast{{$}}
|
||||
; CHECK-NEXT: i32.call $drop=, has_i32_ret
|
||||
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, 0
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, 0
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast@FUNCTION, $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast, $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L2:[0-9]+]]=, 0
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast@FUNCTION, $pop[[L2]]{{$}}
|
||||
; CHECK-NEXT: call foo0@FUNCTION
|
||||
; CHECK-NEXT: i32.call $drop=, .Lfoo1_bitcast@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call foo2@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call foo1@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call foo3@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call .Lfoo0_bitcast, $pop[[L2]]{{$}}
|
||||
; CHECK-NEXT: call foo0
|
||||
; CHECK-NEXT: i32.call $drop=, .Lfoo1_bitcast{{$}}
|
||||
; CHECK-NEXT: call foo2{{$}}
|
||||
; CHECK-NEXT: call foo1{{$}}
|
||||
; CHECK-NEXT: call foo3{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
define void @test() {
|
||||
entry:
|
||||
|
@ -55,9 +55,9 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: test_structs:
|
||||
; CHECK: call .Lhas_i32_arg_bitcast.1@FUNCTION, $pop{{[0-9]+}}, $pop{{[0-9]+$}}
|
||||
; CHECK: call .Lhas_i32_arg_bitcast@FUNCTION, $0, $pop2
|
||||
; CHECK: call .Lhas_struct_arg_bitcast@FUNCTION{{$}}
|
||||
; CHECK: call .Lhas_i32_arg_bitcast.1, $pop{{[0-9]+}}, $pop{{[0-9]+$}}
|
||||
; CHECK: call .Lhas_i32_arg_bitcast, $0, $pop2
|
||||
; CHECK: call .Lhas_struct_arg_bitcast{{$}}
|
||||
define void @test_structs() {
|
||||
entry:
|
||||
call void bitcast (void (i32)* @has_i32_arg to void (i32, {i32})*)(i32 5, {i32} {i32 6})
|
||||
|
@ -67,9 +67,9 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: test_structs_unhandled:
|
||||
; CHECK: call has_struct_arg@FUNCTION, $pop{{[0-9]+$}}
|
||||
; CHECK: call has_struct_arg@FUNCTION, $pop{{[0-9]+$}}
|
||||
; CHECK: call has_i32_ret@FUNCTION, $pop{{[0-9]+$}}
|
||||
; CHECK: call has_struct_arg, $pop{{[0-9]+$}}
|
||||
; CHECK: call has_struct_arg, $pop{{[0-9]+$}}
|
||||
; CHECK: call has_i32_ret, $pop{{[0-9]+$}}
|
||||
define void @test_structs_unhandled() {
|
||||
entry:
|
||||
call void @has_struct_arg({i32} {i32 3})
|
||||
|
@ -81,10 +81,10 @@ entry:
|
|||
; CHECK-LABEL: test_varargs:
|
||||
; CHECK: global.set
|
||||
; CHECK: i32.const $push[[L3:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: call .Lvararg_bitcast@FUNCTION, $pop[[L3]]{{$}}
|
||||
; CHECK-NEXT: call .Lvararg_bitcast, $pop[[L3]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L4:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: i32.store 0($[[L5:[0-9]+]]), $pop[[L4]]{{$}}
|
||||
; CHECK-NEXT: call .Lplain_bitcast@FUNCTION, $[[L5]]{{$}}
|
||||
; CHECK-NEXT: call .Lplain_bitcast, $[[L5]]{{$}}
|
||||
define void @test_varargs() {
|
||||
call void bitcast (void (...)* @vararg to void (i32)*)(i32 0)
|
||||
call void (...) bitcast (void (i32)* @plain to void (...)*)(i32 0)
|
||||
|
@ -97,7 +97,7 @@ define void @test_varargs() {
|
|||
|
||||
; CHECK-LABEL: test_store:
|
||||
; CHECK: i32.const $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, has_i32_ret@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, has_i32_ret{{$}}
|
||||
; CHECK-NEXT: i32.store global_func($pop[[L0]]), $pop[[L1]]{{$}}
|
||||
define void @test_store() {
|
||||
%1 = bitcast i32 ()* @has_i32_ret to void ()*
|
||||
|
@ -121,10 +121,10 @@ define i32 @test_load() {
|
|||
declare void @call_func(i32 ()*)
|
||||
|
||||
; CHECK-LABEL: test_argument:
|
||||
; CHECK: i32.const $push[[L0:[0-9]+]]=, has_i32_ret@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call call_func@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, has_i32_arg@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call call_func@FUNCTION, $pop[[L1]]{{$}}
|
||||
; CHECK: i32.const $push[[L0:[0-9]+]]=, has_i32_ret{{$}}
|
||||
; CHECK-NEXT: call call_func, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L1:[0-9]+]]=, has_i32_arg{{$}}
|
||||
; CHECK-NEXT: call call_func, $pop[[L1]]{{$}}
|
||||
define void @test_argument() {
|
||||
call void @call_func(i32 ()* @has_i32_ret)
|
||||
call void @call_func(i32 ()* bitcast (void (i32)* @has_i32_arg to i32 ()*))
|
||||
|
@ -134,14 +134,14 @@ define void @test_argument() {
|
|||
; Invokes should be treated like calls
|
||||
|
||||
; CHECK-LABEL: test_invoke:
|
||||
; CHECK: i32.const $push[[L1:[0-9]+]]=, call_func@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, has_i32_ret@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call "__invoke_void_i32()*"@FUNCTION, $pop[[L1]], $pop[[L0]]{{$}}
|
||||
; CHECK: i32.const $push[[L3:[0-9]+]]=, call_func@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L2:[0-9]+]]=, has_i32_arg@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call "__invoke_void_i32()*"@FUNCTION, $pop[[L3]], $pop[[L2]]{{$}}
|
||||
; CHECK: i32.const $push[[L4:[0-9]+]]=, .Lhas_i32_arg_bitcast.2@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call __invoke_void@FUNCTION, $pop[[L4]]{{$}}
|
||||
; CHECK: i32.const $push[[L1:[0-9]+]]=, call_func{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, has_i32_ret{{$}}
|
||||
; CHECK-NEXT: call "__invoke_void_i32()*", $pop[[L1]], $pop[[L0]]{{$}}
|
||||
; CHECK: i32.const $push[[L3:[0-9]+]]=, call_func{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L2:[0-9]+]]=, has_i32_arg{{$}}
|
||||
; CHECK-NEXT: call "__invoke_void_i32()*", $pop[[L3]], $pop[[L2]]{{$}}
|
||||
; CHECK: i32.const $push[[L4:[0-9]+]]=, .Lhas_i32_arg_bitcast.2{{$}}
|
||||
; CHECK-NEXT: call __invoke_void, $pop[[L4]]{{$}}
|
||||
declare i32 @personality(...)
|
||||
define void @test_invoke() personality i32 (...)* @personality {
|
||||
entry:
|
||||
|
@ -167,37 +167,37 @@ end:
|
|||
|
||||
; CHECK-LABEL: .Lhas_i32_arg_bitcast:
|
||||
; CHECK-NEXT: .functype .Lhas_i32_arg_bitcast (i32, i32) -> ()
|
||||
; CHECK-NEXT: call has_i32_arg@FUNCTION, $1{{$}}
|
||||
; CHECK-NEXT: call has_i32_arg, $1{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
|
||||
; CHECK-LABEL: .Lhas_i32_arg_bitcast.1:
|
||||
; CHECK-NEXT: .functype .Lhas_i32_arg_bitcast.1 (i32, i32) -> ()
|
||||
; CHECK-NEXT: call has_i32_arg@FUNCTION, $0{{$}}
|
||||
; CHECK-NEXT: call has_i32_arg, $0{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
|
||||
; CHECK-LABEL: .Lhas_i32_arg_bitcast.2:
|
||||
; CHECK: call has_i32_arg@FUNCTION, $0{{$}}
|
||||
; CHECK: call has_i32_arg, $0{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
|
||||
; CHECK-LABEL: .Lhas_i32_ret_bitcast:
|
||||
; CHECK: call $drop=, has_i32_ret@FUNCTION{{$}}
|
||||
; CHECK: call $drop=, has_i32_ret{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
|
||||
; CHECK-LABEL: .Lvararg_bitcast:
|
||||
; CHECK: call vararg@FUNCTION, $1{{$}}
|
||||
; CHECK: call vararg, $1{{$}}
|
||||
; CHECK: end_function
|
||||
|
||||
; CHECK-LABEL: .Lplain_bitcast:
|
||||
; CHECK: call plain@FUNCTION, $1{{$}}
|
||||
; CHECK: call plain, $1{{$}}
|
||||
; CHECK: end_function
|
||||
|
||||
; CHECK-LABEL: .Lfoo0_bitcast:
|
||||
; CHECK-NEXT: .functype .Lfoo0_bitcast (i32) -> ()
|
||||
; CHECK-NEXT: call foo0@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call foo0{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
|
||||
; CHECK-LABEL: .Lfoo1_bitcast:
|
||||
; CHECK-NEXT: .functype .Lfoo1_bitcast () -> (i32)
|
||||
; CHECK-NEXT: call foo1@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call foo1{{$}}
|
||||
; CHECK-NEXT: local.copy $push0=, $0
|
||||
; CHECK-NEXT: end_function
|
||||
|
|
|
@ -21,7 +21,7 @@ define i32 @foo() {
|
|||
|
||||
; CHECK-LABEL: call_memcpy:
|
||||
; CHECK-NEXT: .functype call_memcpy (i32, i32, i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: i32.call $push0=, memcpy@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: i32.call $push0=, memcpy, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return $pop0{{$}}
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i1)
|
||||
define i8* @call_memcpy(i8* %p, i8* nocapture readonly %q, i32 %n) {
|
||||
|
|
|
@ -36,7 +36,7 @@ define i128 @sub128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: mul128:
|
||||
; CHECK-NEXT: .functype mul128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __multi3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __multi3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @mul128(i128 %x, i128 %y) {
|
||||
%a = mul i128 %x, %y
|
||||
|
@ -45,7 +45,7 @@ define i128 @mul128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: sdiv128:
|
||||
; CHECK-NEXT: .functype sdiv128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __divti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __divti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @sdiv128(i128 %x, i128 %y) {
|
||||
%a = sdiv i128 %x, %y
|
||||
|
@ -54,7 +54,7 @@ define i128 @sdiv128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: udiv128:
|
||||
; CHECK-NEXT: .functype udiv128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __udivti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __udivti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @udiv128(i128 %x, i128 %y) {
|
||||
%a = udiv i128 %x, %y
|
||||
|
@ -63,7 +63,7 @@ define i128 @udiv128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: srem128:
|
||||
; CHECK-NEXT: .functype srem128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __modti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __modti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @srem128(i128 %x, i128 %y) {
|
||||
%a = srem i128 %x, %y
|
||||
|
@ -72,7 +72,7 @@ define i128 @srem128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: urem128:
|
||||
; CHECK-NEXT: .functype urem128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __umodti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __umodti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @urem128(i128 %x, i128 %y) {
|
||||
%a = urem i128 %x, %y
|
||||
|
@ -118,7 +118,7 @@ define i128 @xor128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: shl128:
|
||||
; CHECK-NEXT: .functype shl128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __ashlti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @shl128(i128 %x, i128 %y) {
|
||||
%a = shl i128 %x, %y
|
||||
|
@ -127,7 +127,7 @@ define i128 @shl128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: shr128:
|
||||
; CHECK-NEXT: .functype shr128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __lshrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @shr128(i128 %x, i128 %y) {
|
||||
%a = lshr i128 %x, %y
|
||||
|
@ -136,7 +136,7 @@ define i128 @shr128(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: sar128:
|
||||
; CHECK-NEXT: .functype sar128 (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __ashrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @sar128(i128 %x, i128 %y) {
|
||||
%a = ashr i128 %x, %y
|
||||
|
@ -207,8 +207,8 @@ define i32 @eqz128(i128 %x) {
|
|||
|
||||
; CHECK-LABEL: rotl:
|
||||
; CHECK-NEXT: .functype rotl (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __ashlti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @rotl(i128 %x, i128 %y) {
|
||||
%z = sub i128 128, %y
|
||||
|
@ -220,8 +220,8 @@ define i128 @rotl(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: masked_rotl:
|
||||
; CHECK-NEXT: .functype masked_rotl (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __ashlti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @masked_rotl(i128 %x, i128 %y) {
|
||||
%a = and i128 %y, 127
|
||||
|
@ -234,8 +234,8 @@ define i128 @masked_rotl(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: rotr:
|
||||
; CHECK-NEXT: .functype rotr (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __lshrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @rotr(i128 %x, i128 %y) {
|
||||
%z = sub i128 128, %y
|
||||
|
@ -247,8 +247,8 @@ define i128 @rotr(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: masked_rotr:
|
||||
; CHECK-NEXT: .functype masked_rotr (i32, i64, i64, i64, i64) -> (){{$}}
|
||||
; CHECK: call __lshrti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3@FUNCTION, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __lshrti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: call __ashlti3, ${{.+}}, ${{.+}}, ${{.+}}, ${{.+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define i128 @masked_rotr(i128 %x, i128 %y) {
|
||||
%a = and i128 %y, 127
|
||||
|
|
|
@ -20,31 +20,31 @@ entry:
|
|||
%s = alloca void (%struct.big*)*, align 4
|
||||
%i128ret = alloca i128 (i64)*, align 8
|
||||
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_fd@FUNCTION
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_vj@FUNCTION
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_fd
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_vj
|
||||
store float (double)* @extern_fd, float (double)** %fd, align 4
|
||||
store void (i64)* @extern_vj, void (i64)** %vj, align 4
|
||||
%0 = load void (i64)*, void (i64)** %vj, align 4
|
||||
call void %0(i64 1)
|
||||
|
||||
; CHECK: i32.const {{.+}}=, extern_v@FUNCTION
|
||||
; CHECK: i32.const {{.+}}=, extern_v
|
||||
store void ()* @extern_v, void ()** %v, align 4
|
||||
%1 = load void ()*, void ()** %v, align 4
|
||||
call void %1()
|
||||
|
||||
; CHECK: i32.const {{.+}}=, extern_ijidf@FUNCTION
|
||||
; CHECK: i32.const {{.+}}=, extern_ijidf
|
||||
store i32 (i64, i32, double, float)* @extern_ijidf, i32 (i64, i32, double, float)** %ijidf, align 4
|
||||
%2 = load i32 (i64, i32, double, float)*, i32 (i64, i32, double, float)** %ijidf, align 4
|
||||
%call = call i32 %2(i64 1, i32 2, double 3.000000e+00, float 4.000000e+00)
|
||||
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_struct@FUNCTION
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_sret@FUNCTION
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_struct
|
||||
; CHECK-DAG: i32.const {{.+}}=, extern_sret
|
||||
store void (%struct.big*)* @extern_struct, void (%struct.big*)** %vs, align 4
|
||||
store void (%struct.big*)* @extern_sret, void (%struct.big*)** %s, align 4
|
||||
%3 = load float (double)*, float (double)** %fd, align 4
|
||||
%4 = ptrtoint float (double)* %3 to i32
|
||||
|
||||
; CHECK: i32.const {{.+}}=, extern_i128ret@FUNCTION
|
||||
; CHECK: i32.const {{.+}}=, extern_i128ret
|
||||
store i128 (i64)* @extern_i128ret, i128 (i64)** %i128ret, align 8
|
||||
%5 = load i128 (i64)*, i128 (i64)** %i128ret, align 8
|
||||
%6 = call i128 %5(i64 1)
|
||||
|
|
|
@ -52,9 +52,9 @@ define i128 @i128libcalls(i128 %x, i128 %y) {
|
|||
|
||||
; CHECK-LABEL: f64libcalls:
|
||||
define double @f64libcalls(double %x, double %y) {
|
||||
; CHECK: f64.call $push{{[0-9]}}=, cos@FUNCTION
|
||||
; CHECK: f64.call $push{{[0-9]}}=, cos
|
||||
%a = call double @llvm.cos.f64(double %x)
|
||||
; CHECK: f64.call $push{{[0-9]}}=, log10@FUNCTION
|
||||
; CHECK: f64.call $push{{[0-9]}}=, log10
|
||||
%b = call double @llvm.log10.f64(double %a)
|
||||
ret double %b
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ define hidden void @exception() personality i8* bitcast (i32 (...)* @__gxx_perso
|
|||
entry:
|
||||
invoke void @foo()
|
||||
to label %try.cont unwind label %lpad
|
||||
; EH: call __invoke_void@FUNCTION
|
||||
; NONE: call foo@FUNCTION
|
||||
; EH: call __invoke_void
|
||||
; NONE: call foo
|
||||
|
||||
lpad: ; preds = %entry
|
||||
%0 = landingpad { i8*, i32 }
|
||||
|
@ -39,10 +39,10 @@ entry:
|
|||
%arraydecay1 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], [1 x %struct.__jmp_buf_tag]* %buf, i32 0, i32 0
|
||||
call void @longjmp(%struct.__jmp_buf_tag* %arraydecay1, i32 1) #1
|
||||
unreachable
|
||||
; SJLJ: i32.call saveSetjmp@FUNCTION
|
||||
; SJLJ: i32.call testSetjmp@FUNCTION
|
||||
; NONE: i32.call setjmp@FUNCTION
|
||||
; NONE: call longjmp@FUNCTION
|
||||
; SJLJ: i32.call saveSetjmp
|
||||
; SJLJ: i32.call testSetjmp
|
||||
; NONE: i32.call setjmp
|
||||
; NONE: call longjmp
|
||||
}
|
||||
|
||||
declare void @foo()
|
||||
|
|
|
@ -41,14 +41,14 @@ declare void @after_the_null()
|
|||
|
||||
; CHECK-LABEL: .Lcall_dtors.0:
|
||||
; CHECK-NEXT: .functype .Lcall_dtors.0 (i32) -> (){{$}}
|
||||
; CHECK-NEXT: call orig_dtor0@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor0{{$}}
|
||||
|
||||
; CHECK-LABEL: .Lregister_call_dtors.0:
|
||||
; CHECK: block
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.0@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.0{{$}}
|
||||
; CHECK-NEXT: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, __dso_handle
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit@FUNCTION, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: br_if 0, $pop3
|
||||
; CHECK-NEXT: return
|
||||
; CHECK: end_block
|
||||
|
@ -56,15 +56,15 @@ declare void @after_the_null()
|
|||
|
||||
; CHECK-LABEL: .Lcall_dtors.1:
|
||||
; CHECK-NEXT: .functype .Lcall_dtors.1 (i32) -> (){{$}}
|
||||
; CHECK-NEXT: call orig_dtor1a@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1b@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1a{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1b{{$}}
|
||||
|
||||
; CHECK-LABEL: .Lregister_call_dtors.1:
|
||||
; CHECK: block
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1{{$}}
|
||||
; CHECK-NEXT: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, __dso_handle
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit@FUNCTION, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: br_if 0, $pop3
|
||||
; CHECK-NEXT: return
|
||||
; CHECK: end_block
|
||||
|
@ -72,14 +72,14 @@ declare void @after_the_null()
|
|||
|
||||
; CHECK-LABEL: .Lcall_dtors.1.associated1c0:
|
||||
; CHECK-NEXT: .functype .Lcall_dtors.1.associated1c0 (i32) -> (){{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c0@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c0{{$}}
|
||||
|
||||
; CHECK-LABEL: .Lregister_call_dtors.1.associated1c0:
|
||||
; CHECK: block
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1.associated1c0@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1.associated1c0{{$}}
|
||||
; CHECK-NEXT: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, __dso_handle
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit@FUNCTION, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: br_if 0, $pop3
|
||||
; CHECK-NEXT: return
|
||||
; CHECK: end_block
|
||||
|
@ -87,15 +87,15 @@ declare void @after_the_null()
|
|||
|
||||
; CHECK-LABEL: .Lcall_dtors.1.associated1c1:
|
||||
; CHECK-NEXT: .functype .Lcall_dtors.1.associated1c1 (i32) -> (){{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c1a@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c1b@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c1a{{$}}
|
||||
; CHECK-NEXT: call orig_dtor1c1b{{$}}
|
||||
|
||||
; CHECK-LABEL: .Lregister_call_dtors.1.associated1c1:
|
||||
; CHECK: block
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1.associated1c1@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors.1.associated1c1{{$}}
|
||||
; CHECK-NEXT: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, __dso_handle
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit@FUNCTION, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: br_if 0, $pop3
|
||||
; CHECK-NEXT: return
|
||||
; CHECK: end_block
|
||||
|
@ -103,27 +103,27 @@ declare void @after_the_null()
|
|||
|
||||
; CHECK-LABEL: .Lcall_dtors:
|
||||
; CHECK-NEXT: .functype .Lcall_dtors (i32) -> (){{$}}
|
||||
; CHECK-NEXT: call orig_dtor65536@FUNCTION{{$}}
|
||||
; CHECK-NEXT: call orig_dtor65536{{$}}
|
||||
|
||||
; CHECK-LABEL: .Lregister_call_dtors:
|
||||
; CHECK: block
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.const $push2=, .Lcall_dtors{{$}}
|
||||
; CHECK-NEXT: i32.const $push1=, 0
|
||||
; CHECK-NEXT: i32.const $push0=, __dso_handle
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit@FUNCTION, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, __cxa_atexit, $pop2, $pop1, $pop0{{$}}
|
||||
; CHECK-NEXT: br_if 0, $pop3
|
||||
; CHECK-NEXT: return
|
||||
; CHECK: end_block
|
||||
; CHECK-NEXT: unreachable
|
||||
|
||||
; CHECK-LABEL: .section .init_array.0,"",@
|
||||
; CHECK: .int32 .Lregister_call_dtors.0@FUNCTION{{$}}
|
||||
; CHECK: .int32 .Lregister_call_dtors.0{{$}}
|
||||
; CHECK-LABEL: .section .init_array.1,"",@
|
||||
; CHECK: .int32 .Lregister_call_dtors.1@FUNCTION{{$}}
|
||||
; CHECK: .int32 .Lregister_call_dtors.1{{$}}
|
||||
; CHECK-LABEL: .section .init_array.200,"",@
|
||||
; CHECK: .int32 orig_ctor@FUNCTION{{$}}
|
||||
; CHECK: .int32 orig_ctor{{$}}
|
||||
; CHECK-LABEL: .section .init_array,"",@
|
||||
; CHECK: .int32 .Lregister_call_dtors@FUNCTION{{$}}
|
||||
; CHECK: .int32 .Lregister_call_dtors{{$}}
|
||||
|
||||
; CHECK-LABEL: .weak __dso_handle
|
||||
|
||||
|
|
|
@ -14,5 +14,5 @@ define i32 @foo() {
|
|||
|
||||
; CHECK-LABEL: foo:
|
||||
; CHECK-NEXT: .functype foo () -> (i32)
|
||||
; CHECK-NEXT: call __original_main@FUNCTION
|
||||
; CHECK-NEXT: call __original_main
|
||||
; CHECK-NEXT: end_function
|
||||
|
|
|
@ -16,4 +16,4 @@ define i32 @main() {
|
|||
|
||||
; CHECK-LABEL: main:
|
||||
; CHECK-NEXT: .functype main (i32, i32) -> (i32)
|
||||
; CHECK: call __original_main@FUNCTION
|
||||
; CHECK: call __original_main
|
||||
|
|
|
@ -12,7 +12,7 @@ declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1)
|
|||
; Test that return values are optimized.
|
||||
|
||||
; CHECK-LABEL: copy_yes:
|
||||
; CHECK: i32.call $push0=, memcpy@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $push0=, memcpy, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return $pop0{{$}}
|
||||
define i8* @copy_yes(i8* %dst, i8* %src, i32 %len) {
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %src, i32 %len, i1 false)
|
||||
|
@ -20,7 +20,7 @@ define i8* @copy_yes(i8* %dst, i8* %src, i32 %len) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: copy_no:
|
||||
; CHECK: i32.call $drop=, memcpy@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $drop=, memcpy, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @copy_no(i8* %dst, i8* %src, i32 %len) {
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %src, i32 %len, i1 false)
|
||||
|
@ -28,7 +28,7 @@ define void @copy_no(i8* %dst, i8* %src, i32 %len) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: move_yes:
|
||||
; CHECK: i32.call $push0=, memmove@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $push0=, memmove, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return $pop0{{$}}
|
||||
define i8* @move_yes(i8* %dst, i8* %src, i32 %len) {
|
||||
call void @llvm.memmove.p0i8.p0i8.i32(i8* %dst, i8* %src, i32 %len, i1 false)
|
||||
|
@ -36,7 +36,7 @@ define i8* @move_yes(i8* %dst, i8* %src, i32 %len) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: move_no:
|
||||
; CHECK: i32.call $drop=, memmove@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $drop=, memmove, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @move_no(i8* %dst, i8* %src, i32 %len) {
|
||||
call void @llvm.memmove.p0i8.p0i8.i32(i8* %dst, i8* %src, i32 %len, i1 false)
|
||||
|
@ -44,7 +44,7 @@ define void @move_no(i8* %dst, i8* %src, i32 %len) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: set_yes:
|
||||
; CHECK: i32.call $push0=, memset@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $push0=, memset, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return $pop0{{$}}
|
||||
define i8* @set_yes(i8* %dst, i8 %src, i32 %len) {
|
||||
call void @llvm.memset.p0i8.i32(i8* %dst, i8 %src, i32 %len, i1 false)
|
||||
|
@ -52,7 +52,7 @@ define i8* @set_yes(i8* %dst, i8 %src, i32 %len) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: set_no:
|
||||
; CHECK: i32.call $drop=, memset@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK: i32.call $drop=, memset, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @set_no(i8* %dst, i8 %src, i32 %len) {
|
||||
call void @llvm.memset.p0i8.i32(i8* %dst, i8 %src, i32 %len, i1 false)
|
||||
|
@ -61,8 +61,8 @@ define void @set_no(i8* %dst, i8 %src, i32 %len) {
|
|||
|
||||
|
||||
; CHECK-LABEL: frame_index:
|
||||
; CHECK: i32.call $drop=, memset@FUNCTION, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: i32.call $push{{[0-9]+}}=, memset@FUNCTION, ${{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: i32.call $drop=, memset, $pop{{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: i32.call $push{{[0-9]+}}=, memset, ${{[0-9]+}}, $pop{{[0-9]+}}, $pop{{[0-9]+}}{{$}}
|
||||
; CHECK: return{{$}}
|
||||
define void @frame_index() {
|
||||
entry:
|
||||
|
@ -80,7 +80,7 @@ entry:
|
|||
; this specific functionality.
|
||||
|
||||
; CHECK-LABEL: drop_result:
|
||||
; CHECK: i32.call $drop=, memset@FUNCTION, $0, $1, $2
|
||||
; CHECK: i32.call $drop=, memset, $0, $1, $2
|
||||
declare i8* @def()
|
||||
declare void @block_tail_dup()
|
||||
define i8* @drop_result(i8* %arg, i8 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) {
|
||||
|
@ -113,7 +113,7 @@ bb11:
|
|||
; result of the memset *is* stackified.
|
||||
|
||||
; CHECK-LABEL: tail_dup_to_reuse_result:
|
||||
; CHECK: i32.call $push{{[0-9]+}}=, memset@FUNCTION, $0, $1, $2
|
||||
; CHECK: i32.call $push{{[0-9]+}}=, memset, $0, $1, $2
|
||||
define i8* @tail_dup_to_reuse_result(i8* %arg, i8 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) {
|
||||
bb:
|
||||
%tmp = icmp eq i32 %arg3, 0
|
||||
|
|
|
@ -14,6 +14,6 @@ entry:
|
|||
ret i128 %X
|
||||
}
|
||||
|
||||
; CHECK: call __muloti4@FUNCTION, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}{{$}}
|
||||
; CHECK: call __muloti4, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}, $pop{{[0-9]*}}{{$}}
|
||||
|
||||
declare { i128, i1 } @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone
|
||||
|
|
|
@ -328,8 +328,8 @@ entry:
|
|||
; CHECK: .functype simple_multiple_use (i32, i32) -> (){{$}}
|
||||
; CHECK-NEXT: i32.mul $push[[NUM0:[0-9]+]]=, $1, $0{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[NUM1:[0-9]+]]=, $[[NUM2:[0-9]+]]=, $pop[[NUM0]]{{$}}
|
||||
; CHECK-NEXT: call use_a@FUNCTION, $pop[[NUM1]]{{$}}
|
||||
; CHECK-NEXT: call use_b@FUNCTION, $[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: call use_a, $pop[[NUM1]]{{$}}
|
||||
; CHECK-NEXT: call use_b, $[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
; NOREGS-LABEL: simple_multiple_use:
|
||||
; NOREGS: .functype simple_multiple_use (i32, i32) -> (){{$}}
|
||||
|
@ -337,9 +337,9 @@ entry:
|
|||
; NOREGS-NEXT: local.get 0{{$}}
|
||||
; NOREGS-NEXT: i32.mul
|
||||
; NOREGS-NEXT: local.tee 1{{$}}
|
||||
; NOREGS-NEXT: call use_a@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: call use_a{{$}}
|
||||
; NOREGS-NEXT: local.get 1{{$}}
|
||||
; NOREGS-NEXT: call use_b@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: call use_b{{$}}
|
||||
; NOREGS-NEXT: return{{$}}
|
||||
declare void @use_a(i32)
|
||||
declare void @use_b(i32)
|
||||
|
@ -356,7 +356,7 @@ define void @simple_multiple_use(i32 %x, i32 %y) {
|
|||
; CHECK: .functype multiple_uses_in_same_insn (i32, i32) -> (){{$}}
|
||||
; CHECK-NEXT: i32.mul $push[[NUM0:[0-9]+]]=, $1, $0{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[NUM1:[0-9]+]]=, $[[NUM2:[0-9]+]]=, $pop[[NUM0]]{{$}}
|
||||
; CHECK-NEXT: call use_2@FUNCTION, $pop[[NUM1]], $[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: call use_2, $pop[[NUM1]], $[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
; NOREGS-LABEL: multiple_uses_in_same_insn:
|
||||
; NOREGS: .functype multiple_uses_in_same_insn (i32, i32) -> (){{$}}
|
||||
|
@ -365,7 +365,7 @@ define void @simple_multiple_use(i32 %x, i32 %y) {
|
|||
; NOREGS-NEXT: i32.mul
|
||||
; NOREGS-NEXT: local.tee 1{{$}}
|
||||
; NOREGS-NEXT: local.get 1{{$}}
|
||||
; NOREGS-NEXT: call use_2@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: call use_2{{$}}
|
||||
; NOREGS-NEXT: return{{$}}
|
||||
declare void @use_2(i32, i32)
|
||||
define void @multiple_uses_in_same_insn(i32 %x, i32 %y) {
|
||||
|
@ -378,18 +378,18 @@ define void @multiple_uses_in_same_insn(i32 %x, i32 %y) {
|
|||
|
||||
; CHECK-LABEL: commute:
|
||||
; CHECK: .functype commute () -> (i32){{$}}
|
||||
; CHECK-NEXT: i32.call $push0=, red@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.call $push1=, green@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.call $push0=, red{{$}}
|
||||
; CHECK-NEXT: i32.call $push1=, green{{$}}
|
||||
; CHECK-NEXT: i32.add $push2=, $pop0, $pop1{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, blue@FUNCTION{{$}}
|
||||
; CHECK-NEXT: i32.call $push3=, blue{{$}}
|
||||
; CHECK-NEXT: i32.add $push4=, $pop2, $pop3{{$}}
|
||||
; CHECK-NEXT: return $pop4{{$}}
|
||||
; NOREGS-LABEL: commute:
|
||||
; NOREGS: .functype commute () -> (i32){{$}}
|
||||
; NOREGS-NEXT: i32.call red@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: i32.call green@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: i32.call red{{$}}
|
||||
; NOREGS-NEXT: i32.call green{{$}}
|
||||
; NOREGS-NEXT: i32.add {{$}}
|
||||
; NOREGS-NEXT: i32.call blue@FUNCTION{{$}}
|
||||
; NOREGS-NEXT: i32.call blue{{$}}
|
||||
; NOREGS-NEXT: i32.add {{$}}
|
||||
; NOREGS-NEXT: return{{$}}
|
||||
declare i32 @red()
|
||||
|
@ -408,21 +408,21 @@ define i32 @commute() {
|
|||
; an implicit local.get for the register.
|
||||
|
||||
; CHECK-LABEL: no_stackify_past_use:
|
||||
; CHECK: i32.call $1=, callee@FUNCTION, $0
|
||||
; CHECK: i32.call $1=, callee, $0
|
||||
; CHECK-NEXT: i32.const $push0=, 1
|
||||
; CHECK-NEXT: i32.add $push1=, $0, $pop0
|
||||
; CHECK-NEXT: i32.call $push2=, callee@FUNCTION, $pop1
|
||||
; CHECK-NEXT: i32.call $push2=, callee, $pop1
|
||||
; CHECK-NEXT: i32.sub $push3=, $pop2, $1
|
||||
; CHECK-NEXT: i32.div_s $push4=, $pop3, $1
|
||||
; CHECK-NEXT: return $pop4
|
||||
; NOREGS-LABEL: no_stackify_past_use:
|
||||
; NOREGS: local.get 0{{$}}
|
||||
; NOREGS-NEXT: i32.call callee@FUNCTION
|
||||
; NOREGS-NEXT: i32.call callee
|
||||
; NOREGS-NEXT: local.set 1{{$}}
|
||||
; NOREGS-NEXT: local.get 0{{$}}
|
||||
; NOREGS-NEXT: i32.const 1
|
||||
; NOREGS-NEXT: i32.add
|
||||
; NOREGS-NEXT: i32.call callee@FUNCTION
|
||||
; NOREGS-NEXT: i32.call callee
|
||||
; NOREGS-NEXT: local.get 1{{$}}
|
||||
; NOREGS-NEXT: i32.sub
|
||||
; NOREGS-NEXT: local.get 1{{$}}
|
||||
|
@ -442,23 +442,23 @@ define i32 @no_stackify_past_use(i32 %arg) {
|
|||
; so we can reorder the operands and stackify.
|
||||
|
||||
; CHECK-LABEL: commute_to_fix_ordering:
|
||||
; CHECK: i32.call $push[[L0:.+]]=, callee@FUNCTION, $0
|
||||
; CHECK: i32.call $push[[L0:.+]]=, callee, $0
|
||||
; CHECK: local.tee $push[[L1:.+]]=, $1=, $pop[[L0]]
|
||||
; CHECK: i32.const $push0=, 1
|
||||
; CHECK: i32.add $push1=, $0, $pop0
|
||||
; CHECK: i32.call $push2=, callee@FUNCTION, $pop1
|
||||
; CHECK: i32.call $push2=, callee, $pop1
|
||||
; CHECK: i32.add $push3=, $1, $pop2
|
||||
; CHECK: i32.mul $push4=, $pop[[L1]], $pop3
|
||||
; CHECK: return $pop4
|
||||
; NOREGS-LABEL: commute_to_fix_ordering:
|
||||
; NOREGS: local.get 0{{$}}
|
||||
; NOREGS: i32.call callee@FUNCTION
|
||||
; NOREGS: i32.call callee
|
||||
; NOREGS: local.tee 1
|
||||
; NOREGS: local.get 1{{$}}
|
||||
; NOREGS: local.get 0{{$}}
|
||||
; NOREGS: i32.const 1
|
||||
; NOREGS: i32.add
|
||||
; NOREGS: i32.call callee@FUNCTION
|
||||
; NOREGS: i32.call callee
|
||||
; NOREGS: i32.add
|
||||
; NOREGS: i32.mul
|
||||
; NOREGS: return
|
||||
|
@ -541,11 +541,11 @@ define i32 @no_stackify_call_past_load() {
|
|||
; CHECK-LABEL: no_stackify_store_past_load
|
||||
; CHECK: i32.store 0($1), $0
|
||||
; CHECK: i32.load {{.*}}, 0($2)
|
||||
; CHECK: i32.call {{.*}}, callee@FUNCTION, $0{{$}}
|
||||
; CHECK: i32.call {{.*}}, callee, $0{{$}}
|
||||
; NOREGS-LABEL: no_stackify_store_past_load
|
||||
; NOREGS: i32.store 0
|
||||
; NOREGS: i32.load 0
|
||||
; NOREGS: i32.call callee@FUNCTION{{$}}
|
||||
; NOREGS: i32.call callee{{$}}
|
||||
define i32 @no_stackify_store_past_load(i32 %a, i32* %p1, i32* %p2) {
|
||||
store i32 %a, i32* %p1
|
||||
%b = load i32, i32* %p2, align 4
|
||||
|
@ -556,12 +556,12 @@ define i32 @no_stackify_store_past_load(i32 %a, i32* %p1, i32* %p2) {
|
|||
; Can still stackify past invariant loads.
|
||||
; CHECK-LABEL: store_past_invar_load
|
||||
; CHECK: i32.store 0($1), $0
|
||||
; CHECK: i32.call {{.*}}, callee@FUNCTION, $0
|
||||
; CHECK: i32.call {{.*}}, callee, $0
|
||||
; CHECK: i32.load $push{{.*}}, 0($2)
|
||||
; CHECK: return $pop
|
||||
; NOREGS-LABEL: store_past_invar_load
|
||||
; NOREGS: i32.store 0
|
||||
; NOREGS: i32.call callee@FUNCTION
|
||||
; NOREGS: i32.call callee
|
||||
; NOREGS: i32.load 0
|
||||
; NOREGS: return
|
||||
define i32 @store_past_invar_load(i32 %a, i32* %p1, i32* dereferenceable(4) %p2) {
|
||||
|
@ -629,10 +629,10 @@ bb10: ; preds = %bb9, %bb
|
|||
; Don't stackify a call past a __stack_pointer store.
|
||||
|
||||
; CHECK-LABEL: stackpointer_dependency:
|
||||
; CHECK: call {{.+}}, stackpointer_callee@FUNCTION,
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL,
|
||||
; CHECK: call {{.+}}, stackpointer_callee,
|
||||
; CHECK-NEXT: global.set __stack_pointer,
|
||||
; NOREGS-LABEL: stackpointer_dependency:
|
||||
; NOREGS: call stackpointer_callee@FUNCTION
|
||||
; NOREGS: call stackpointer_callee
|
||||
; NOREGS: global.set __stack_pointer
|
||||
declare i32 @stackpointer_callee(i8* readnone, i8* readnone) nounwind readnone
|
||||
declare i8* @llvm.frameaddress(i32)
|
||||
|
|
|
@ -8,8 +8,8 @@ target triple = "wasm32-unknown-unknown"
|
|||
; CHECK-LABEL: _Z3foov:
|
||||
; CHECK-NEXT: .functype _Z3foov () -> (i32){{$}}
|
||||
; CHECK-NEXT: i32.const $push0=, 1{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push1=, _Znwm@FUNCTION, $pop0{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push2=, _ZN5AppleC1Ev@FUNCTION, $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)
|
||||
|
@ -24,7 +24,7 @@ entry:
|
|||
|
||||
; CHECK-LABEL: _Z3barPvS_l:
|
||||
; CHECK-NEXT: .functype _Z3barPvS_l (i32, i32, i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push0=, memcpy@FUNCTION, $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) {
|
||||
|
@ -37,7 +37,7 @@ entry:
|
|||
|
||||
; CHECK-LABEL: test_constant_arg:
|
||||
; CHECK: i32.const $push0=, global{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $drop=, returns_arg@FUNCTION, $pop0{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $drop=, returns_arg, $pop0{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
@global = external global i32
|
||||
@addr = global i32* @global
|
||||
|
@ -52,9 +52,9 @@ declare i32* @returns_arg(i32* returned)
|
|||
|
||||
; CHECK-LABEL: test_other_skipped:
|
||||
; CHECK-NEXT: .functype test_other_skipped (i32, i32, f64) -> (){{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $drop=, do_something@FUNCTION, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: {{^}} call do_something_with_i32@FUNCTION, $1{{$}}
|
||||
; CHECK-NEXT: {{^}} call do_something_with_double@FUNCTION, $2{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $drop=, do_something, $0, $1, $2{{$}}
|
||||
; CHECK-NEXT: {{^}} call do_something_with_i32, $1{{$}}
|
||||
; CHECK-NEXT: {{^}} call do_something_with_double, $2{{$}}
|
||||
declare i32 @do_something(i32 returned, i32, double)
|
||||
declare void @do_something_with_i32(i32)
|
||||
declare void @do_something_with_double(double)
|
||||
|
@ -69,7 +69,7 @@ define void @test_other_skipped(i32 %a, i32 %b, double %c) {
|
|||
|
||||
; CHECK-LABEL: test_second_arg:
|
||||
; CHECK-NEXT: .functype test_second_arg (i32, i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push0=, do_something_else@FUNCTION, $0, $1{{$}}
|
||||
; CHECK-NEXT: {{^}} i32.call $push0=, do_something_else, $0, $1{{$}}
|
||||
; CHECK-NEXT: return $pop0{{$}}
|
||||
declare i32 @do_something_else(i32, i32 returned)
|
||||
define i32 @test_second_arg(i32 %a, i32 %b) {
|
||||
|
|
|
@ -12,7 +12,7 @@ define i32 @func_1(i16 %arg1 , i32 %arg2) #0 {
|
|||
; CHECK-NEXT: i32.shl $push2=, $0, $pop1
|
||||
; CHECK-NEXT: i32.const $push4=, 16
|
||||
; CHECK-NEXT: i32.shr_s $push3=, $pop2, $pop4
|
||||
; CHECK-NEXT: i32.call $push0=, get_int@FUNCTION, $pop3
|
||||
; CHECK-NEXT: i32.call $push0=, get_int, $pop3
|
||||
; CHECK-NEXT: end_function
|
||||
entry:
|
||||
%retval = call i32 @get_int(i16 signext %arg1)
|
||||
|
|
|
@ -29,7 +29,7 @@ define zeroext i8 @s2z_func(i8 signext %t) {
|
|||
; CHECK-NEXT: .functype z2s_call (i32) -> (i32){{$}}
|
||||
; CHECK-NEXT: i32.const $push[[NUM0:[0-9]+]]=, 255{{$}}
|
||||
; CHECK-NEXT: i32.and $push[[NUM1:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
|
||||
; CHECK-NEXT: call $push[[NUM2:[0-9]+]]=, z2s_func@FUNCTION, $pop[[NUM1]]{{$}}
|
||||
; CHECK-NEXT: call $push[[NUM2:[0-9]+]]=, z2s_func, $pop[[NUM1]]{{$}}
|
||||
; CHECK-NEXT: return $pop[[NUM2]]{{$}}
|
||||
define i32 @z2s_call(i32 %t) {
|
||||
%s = trunc i32 %t to i8
|
||||
|
@ -44,7 +44,7 @@ define i32 @z2s_call(i32 %t) {
|
|||
; CHECK-NEXT: i32.shl $push[[NUM1:[0-9]+]]=, $0, $pop[[NUM0]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[NUM6:[0-9]+]]=, 24{{$}}
|
||||
; CHECK-NEXT: i32.shr_s $push[[NUM2:[0-9]+]]=, $pop[[NUM1]], $pop[[NUM6]]{{$}}
|
||||
; CHECK-NEXT: call $push[[NUM3:[0-9]]]=, s2z_func@FUNCTION, $pop[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: call $push[[NUM3:[0-9]]]=, s2z_func, $pop[[NUM2]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[NUM7:[0-9]+]]=, 24{{$}}
|
||||
; CHECK-NEXT: i32.shl $push[[NUM4:[0-9]+]]=, $pop[[NUM3]], $pop[[NUM7]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[NUM8:[0-9]+]]=, 24{{$}}
|
||||
|
|
|
@ -56,7 +56,7 @@ define i32 @extract_v16i8_s(<16 x i8> %v) {
|
|||
; CHECK-LABEL: extract_var_v16i8_s:
|
||||
; NO-SIMD128-NOT: i8x16
|
||||
; SIMD128-NEXT: .functype extract_var_v16i8_s (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]
|
||||
|
@ -98,7 +98,7 @@ define i32 @extract_v16i8_u(<16 x i8> %v) {
|
|||
; CHECK-LABEL: extract_var_v16i8_u:
|
||||
; NO-SIMD128-NOT: i8x16
|
||||
; SIMD128-NEXT: .functype extract_var_v16i8_u (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -139,7 +139,7 @@ define i8 @extract_v16i8(<16 x i8> %v) {
|
|||
; CHECK-LABEL: extract_var_v16i8:
|
||||
; NO-SIMD128-NOT: i8x16
|
||||
; SIMD128-NEXT: .functype extract_var_v16i8 (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -177,7 +177,7 @@ define <16 x i8> @replace_v16i8(<16 x i8> %v, i8 %x) {
|
|||
; CHECK-LABEL: replace_var_v16i8:
|
||||
; NO-SIMD128-NOT: i8x16
|
||||
; SIMD128-NEXT: .functype replace_var_v16i8 (v128, i32, i32) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
@ -319,7 +319,7 @@ define i32 @extract_v8i16_s(<8 x i16> %v) {
|
|||
; CHECK-LABEL: extract_var_v8i16_s:
|
||||
; NO-SIMD128-NOT: i16x8
|
||||
; SIMD128-NEXT: .functype extract_var_v8i16_s (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -363,7 +363,7 @@ define i32 @extract_v8i16_u(<8 x i16> %v) {
|
|||
; CHECK-LABEL: extract_var_v8i16_u:
|
||||
; NO-SIMD128-NOT: i16x8
|
||||
; SIMD128-NEXT: .functype extract_var_v8i16_u (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -406,7 +406,7 @@ define i16 @extract_v8i16(<8 x i16> %v) {
|
|||
; CHECK-LABEL: extract_var_v8i16:
|
||||
; NO-SIMD128-NOT: i16x8
|
||||
; SIMD128-NEXT: .functype extract_var_v8i16 (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -446,7 +446,7 @@ define <8 x i16> @replace_v8i16(<8 x i16> %v, i16 %x) {
|
|||
; CHECK-LABEL: replace_var_v8i16:
|
||||
; NO-SIMD128-NOT: i16x8
|
||||
; SIMD128-NEXT: .functype replace_var_v8i16 (v128, i32, i32) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
@ -567,7 +567,7 @@ define i32 @extract_v4i32(<4 x i32> %v) {
|
|||
; CHECK-LABEL: extract_var_v4i32:
|
||||
; NO-SIMD128-NOT: i32x4
|
||||
; SIMD128-NEXT: .functype extract_var_v4i32 (v128, i32) -> (i32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -607,7 +607,7 @@ define <4 x i32> @replace_v4i32(<4 x i32> %v, i32 %x) {
|
|||
; CHECK-LABEL: replace_var_v4i32:
|
||||
; NO-SIMD128-NOT: i32x4
|
||||
; SIMD128-NEXT: .functype replace_var_v4i32 (v128, i32, i32) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
@ -720,7 +720,7 @@ define i64 @extract_v2i64(<2 x i64> %v) {
|
|||
; CHECK-LABEL: extract_var_v2i64:
|
||||
; NO-SIMD128-NOT: i64x2
|
||||
; SIMD128-NEXT: .functype extract_var_v2i64 (v128, i32) -> (i64){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -763,7 +763,7 @@ define <2 x i64> @replace_v2i64(<2 x i64> %v, i64 %x) {
|
|||
; NO-SIMD128-NOT: i64x2
|
||||
; SIMD128-VM-NOT: i64x2
|
||||
; SIMD128-NEXT: .functype replace_var_v2i64 (v128, i32, i64) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
@ -873,7 +873,7 @@ define float @extract_v4f32(<4 x float> %v) {
|
|||
; CHECK-LABEL: extract_var_v4f32:
|
||||
; NO-SIMD128-NOT: i64x2
|
||||
; SIMD128-NEXT: .functype extract_var_v4f32 (v128, i32) -> (f32){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -913,7 +913,7 @@ define <4 x float> @replace_v4f32(<4 x float> %v, float %x) {
|
|||
; CHECK-LABEL: replace_var_v4f32:
|
||||
; NO-SIMD128-NOT: f32x4
|
||||
; SIMD128-NEXT: .functype replace_var_v4f32 (v128, i32, f32) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
@ -1025,7 +1025,7 @@ define double @extract_v2f64(<2 x double> %v) {
|
|||
; CHECK-LABEL: extract_var_v2f64:
|
||||
; NO-SIMD128-NOT: i62x2
|
||||
; SIMD128-NEXT: .functype extract_var_v2f64 (v128, i32) -> (f64){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $2=, $pop[[L2]]{{$}}
|
||||
|
@ -1068,7 +1068,7 @@ define <2 x double> @replace_v2f64(<2 x double> %v, double %x) {
|
|||
; NO-SIMD128-NOT: f64x2
|
||||
; SIMD128-VM-NOT: f64x2
|
||||
; SIMD128-NEXT: .functype replace_var_v2f64 (v128, i32, f64) -> (v128){{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; SIMD128-NEXT: global.get $push[[L0:[0-9]+]]=, __stack_pointer{{$}}
|
||||
; SIMD128-NEXT: i32.const $push[[L1:[0-9]+]]=, 16{{$}}
|
||||
; SIMD128-NEXT: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
|
||||
; SIMD128-NEXT: local.tee $push[[L3:[0-9]+]]=, $3=, $pop[[L2]]{{$}}
|
||||
|
|
|
@ -6,18 +6,18 @@ target triple = "wasm32-unknown-unknown"
|
|||
declare void @somefunc(i32*)
|
||||
|
||||
; CHECK-LABEL: underalign:
|
||||
; CHECK: global.get $push[[L1:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L1:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L2:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L10:.+]]=, $pop[[L1]], $pop[[L2]]
|
||||
; CHECK-NEXT: local.tee $push{{.+}}=, [[SP:.+]], $pop[[L10]]
|
||||
|
||||
; CHECK: local.get $push[[L3:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: i32.add $push[[underaligned:.+]]=, $pop[[L3]], $pop{{.+}}
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[underaligned]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[underaligned]]
|
||||
|
||||
; CHECK: local.get $push[[M4:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: i32.add $push[[L5:.+]]=, $pop[[M4]], $pop{{.+}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L5]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L5]]
|
||||
define void @underalign() {
|
||||
entry:
|
||||
%underaligned = alloca i32, align 8
|
||||
|
@ -26,7 +26,7 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: overalign:
|
||||
; CHECK: global.get $push[[L10:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L10:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L9:.+]]=, [[BP:.+]], $pop[[L10]]
|
||||
; CHECK-NEXT: i32.const $push[[L2:.+]]=, 32
|
||||
; CHECK-NEXT: i32.sub $push[[L8:.+]]=, $pop[[L9]], $pop[[L2]]
|
||||
|
@ -35,10 +35,10 @@ entry:
|
|||
; CHECK-NEXT: local.tee $push{{.+}}=, [[SP:.+]], $pop[[L7]]
|
||||
|
||||
; CHECK: local.get $push[[M5:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: call somefunc@FUNCTION, $pop[[M5]]{{$}}
|
||||
; CHECK: call somefunc, $pop[[M5]]{{$}}
|
||||
|
||||
; CHECK: local.get $push[[M6:.+]]=, [[BP]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[M6]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[M6]]
|
||||
define void @overalign() {
|
||||
entry:
|
||||
%overaligned = alloca i32, align 32
|
||||
|
@ -47,7 +47,7 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: over_and_normal_align:
|
||||
; CHECK: global.get $push[[L14:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L14:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L13:.+]]=, [[BP:.+]], $pop[[L14]]
|
||||
; CHECK: i32.sub $push[[L12:.+]]=, $pop[[L13]], $pop{{.+}}
|
||||
; CHECK: i32.and $push[[L11:.+]]=, $pop[[L12]], $pop{{.+}}
|
||||
|
@ -55,13 +55,13 @@ entry:
|
|||
|
||||
; CHECK: local.get $push[[M6:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: i32.add $push[[L6:.+]]=, $pop[[M6]], $pop{{.+}}
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[L6]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[L6]]
|
||||
; CHECK: local.get $push[[M7:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: i32.add $push[[L8:.+]]=, $pop[[M7]], $pop{{.+}}
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[L8]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[L8]]
|
||||
|
||||
; CHECK: local.get $push[[L6:.+]]=, [[BP]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L6]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L6]]
|
||||
define void @over_and_normal_align() {
|
||||
entry:
|
||||
%over = alloca i32, align 32
|
||||
|
@ -72,16 +72,16 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: dynamic_overalign:
|
||||
; CHECK: global.get $push[[L18:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L18:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L17:.+]]=, [[SP:.+]], $pop[[L18]]
|
||||
; CHECK-NEXT: local.set [[BP:.+]], $pop[[L17]]
|
||||
; CHECK: local.tee $push{{.+}}=, [[SP_2:.+]], $pop{{.+}}
|
||||
|
||||
; CHECK: local.get $push[[M8:.+]]=, [[SP_2]]{{$}}
|
||||
; CHECK: call somefunc@FUNCTION, $pop[[M8]]
|
||||
; CHECK: call somefunc, $pop[[M8]]
|
||||
|
||||
; CHECK: local.get $push[[M9:.+]]=, [[BP]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[M9]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[M9]]
|
||||
define void @dynamic_overalign(i32 %num) {
|
||||
entry:
|
||||
%dynamic = alloca i32, i32 %num, align 32
|
||||
|
@ -90,7 +90,7 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: overalign_and_dynamic:
|
||||
; CHECK: global.get $push[[L21:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L21:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L20:.+]]=, [[BP:.+]], $pop[[L21]]
|
||||
; CHECK: i32.sub $push[[L19:.+]]=, $pop[[L20]], $pop{{.+}}
|
||||
; CHECK: i32.and $push[[L18:.+]]=, $pop[[L19]], $pop{{.+}}
|
||||
|
@ -100,12 +100,12 @@ entry:
|
|||
; CHECK-NEXT: local.tee $push{{.+}}=, [[SP:.+]], $pop[[L16]]
|
||||
|
||||
; CHECK: local.get $push[[over:.+]]=, [[FP]]
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[over]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[over]]
|
||||
; CHECK: local.get $push[[another:.+]]=, [[SP]]
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[another]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[another]]
|
||||
|
||||
; CHECK: local.get $push[[M11:.+]]=, [[BP]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[M11]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[M11]]
|
||||
define void @overalign_and_dynamic(i32 %num) {
|
||||
entry:
|
||||
%over = alloca i32, align 32
|
||||
|
@ -116,7 +116,7 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: overalign_static_and_dynamic:
|
||||
; CHECK: global.get $push[[L26:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L26:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L25:.+]]=, [[BP:.+]], $pop[[L26]]
|
||||
; CHECK: i32.sub $push[[L24:.+]]=, $pop[[L25]], $pop{{.+}}
|
||||
; CHECK: i32.and $push[[L23:.+]]=, $pop[[L24]], $pop{{.+}}
|
||||
|
@ -128,15 +128,15 @@ entry:
|
|||
; CHECK: local.get $push[[L19:.+]]=, [[FP]]
|
||||
; CHECK: local.tee $push[[L18:.+]]=, [[FP_2:.+]], $pop[[L19]]
|
||||
; CHECK: i32.add $push[[over:.+]]=, $pop[[L18]], $pop{{.+}}
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[over]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[over]]
|
||||
; CHECK: local.get $push[[M12:.+]]=, [[SP]]
|
||||
; CHECK: call somefunc@FUNCTION, $pop[[M12]]
|
||||
; CHECK: call somefunc, $pop[[M12]]
|
||||
; CHECK: local.get $push[[M13:.+]]=, [[FP_2]]
|
||||
; CHECK: i32.add $push[[static:.+]]=, $pop[[M13]], $pop{{.+}}
|
||||
; CHECK-NEXT: call somefunc@FUNCTION, $pop[[static]]
|
||||
; CHECK-NEXT: call somefunc, $pop[[static]]
|
||||
|
||||
; CHECK: local.get $push[[M14:.+]]=, [[BP]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[M14]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[M14]]
|
||||
define void @overalign_static_and_dynamic(i32 %num) {
|
||||
entry:
|
||||
%over = alloca i32, align 32
|
||||
|
|
|
@ -23,17 +23,17 @@ declare void @foo5()
|
|||
; CHECK: block {{$}}
|
||||
; CHECK: br_table {{[^,]+}}, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0{{$}}
|
||||
; CHECK: .LBB0_2:
|
||||
; CHECK: call foo0@FUNCTION{{$}}
|
||||
; CHECK: call foo0{{$}}
|
||||
; CHECK: .LBB0_3:
|
||||
; CHECK: call foo1@FUNCTION{{$}}
|
||||
; CHECK: call foo1{{$}}
|
||||
; CHECK: .LBB0_4:
|
||||
; CHECK: call foo2@FUNCTION{{$}}
|
||||
; CHECK: call foo2{{$}}
|
||||
; CHECK: .LBB0_5:
|
||||
; CHECK: call foo3@FUNCTION{{$}}
|
||||
; CHECK: call foo3{{$}}
|
||||
; CHECK: .LBB0_6:
|
||||
; CHECK: call foo4@FUNCTION{{$}}
|
||||
; CHECK: call foo4{{$}}
|
||||
; CHECK: .LBB0_7:
|
||||
; CHECK: call foo5@FUNCTION{{$}}
|
||||
; CHECK: call foo5{{$}}
|
||||
; CHECK: .LBB0_8:
|
||||
; CHECK: return{{$}}
|
||||
define void @bar32(i32 %n) {
|
||||
|
@ -103,17 +103,17 @@ sw.epilog: ; preds = %entry, %sw.bb.5, %s
|
|||
; CHECK: block {{$}}
|
||||
; CHECK: br_table {{[^,]+}}, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0{{$}}
|
||||
; CHECK: .LBB1_2:
|
||||
; CHECK: call foo0@FUNCTION{{$}}
|
||||
; CHECK: call foo0{{$}}
|
||||
; CHECK: .LBB1_3:
|
||||
; CHECK: call foo1@FUNCTION{{$}}
|
||||
; CHECK: call foo1{{$}}
|
||||
; CHECK: .LBB1_4:
|
||||
; CHECK: call foo2@FUNCTION{{$}}
|
||||
; CHECK: call foo2{{$}}
|
||||
; CHECK: .LBB1_5:
|
||||
; CHECK: call foo3@FUNCTION{{$}}
|
||||
; CHECK: call foo3{{$}}
|
||||
; CHECK: .LBB1_6:
|
||||
; CHECK: call foo4@FUNCTION{{$}}
|
||||
; CHECK: call foo4{{$}}
|
||||
; CHECK: .LBB1_7:
|
||||
; CHECK: call foo5@FUNCTION{{$}}
|
||||
; CHECK: call foo5{{$}}
|
||||
; CHECK: .LBB1_8:
|
||||
; CHECK: return{{$}}
|
||||
define void @bar64(i64 %n) {
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
|
||||
; WASM32-LABEL: muloti_test
|
||||
; WASM32: global.get $push18=, __stack_pointer@GLOBAL
|
||||
; WASM32: global.get $push18=, __stack_pointer
|
||||
; WASM32: i32.const $push19=, 48
|
||||
; WASM32: i32.sub $push40=, $pop18, $pop19
|
||||
; WASM32: local.tee $push39=, 5, $pop40
|
||||
; WASM32: global.set __stack_pointer@GLOBAL, $pop39
|
||||
; WASM32: global.set __stack_pointer, $pop39
|
||||
; WASM32: local.get $push41=, 5
|
||||
; WASM32: i32.const $push22=, 32
|
||||
; WASM32: i32.add $push23=, $pop41, $pop22
|
||||
|
@ -15,7 +15,7 @@ define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
|
|||
; WASM32: i64.const $push0=, 0
|
||||
; WASM32: local.get $push42=, 3
|
||||
; WASM32: i64.const $push38=, 0
|
||||
; WASM32: call __multi3@FUNCTION, $pop23, $pop43, $pop0, $pop42, $pop38
|
||||
; WASM32: call __multi3, $pop23, $pop43, $pop0, $pop42, $pop38
|
||||
; WASM32: local.get $push44=, 5
|
||||
; WASM32: i32.const $push24=, 16
|
||||
; WASM32: i32.add $push25=, $pop44, $pop24
|
||||
|
@ -23,13 +23,13 @@ define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
|
|||
; WASM32: i64.const $push37=, 0
|
||||
; WASM32: local.get $push45=, 1
|
||||
; WASM32: i64.const $push36=, 0
|
||||
; WASM32: call __multi3@FUNCTION, $pop25, $pop46, $pop37, $pop45, $pop36
|
||||
; WASM32: call __multi3, $pop25, $pop46, $pop37, $pop45, $pop36
|
||||
; WASM32: local.get $push49=, 5
|
||||
; WASM32: local.get $push48=, 2
|
||||
; WASM32: i64.const $push35=, 0
|
||||
; WASM32: local.get $push47=, 3
|
||||
; WASM32: i64.const $push34=, 0
|
||||
; WASM32: call __multi3@FUNCTION, $pop49, $pop48, $pop35, $pop47, $pop34
|
||||
; WASM32: call __multi3, $pop49, $pop48, $pop35, $pop47, $pop34
|
||||
; WASM32: local.get $push51=, 0
|
||||
; WASM32: local.get $push50=, 5
|
||||
; WASM32: i64.load $push1=, 32($pop50)
|
||||
|
@ -74,7 +74,7 @@ define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
|
|||
; WASM32: local.get $push63=, 5
|
||||
; WASM32: i32.const $push20=, 48
|
||||
; WASM32: i32.add $push21=, $pop63, $pop20
|
||||
; WASM32: global.set __stack_pointer@GLOBAL, $pop21
|
||||
; WASM32: global.set __stack_pointer, $pop21
|
||||
|
||||
start:
|
||||
%0 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %l, i128 %r) #2
|
||||
|
|
|
@ -21,7 +21,7 @@ attributes #0 = { inlinehint }
|
|||
attributes #1 = { nounwind readnone speculatable }
|
||||
|
||||
; CHECK-LABEL: wut:
|
||||
; CHECK: call __multi3@FUNCTION, $2, $0, $pop0, $1, $pop7
|
||||
; CHECK: call __multi3, $2, $0, $pop0, $1, $pop7
|
||||
; CHECK: i64.load $0=, 8($2)
|
||||
define i1 @wut(i64, i64) {
|
||||
start:
|
||||
|
|
|
@ -12,7 +12,7 @@ declare void @llvm.debugtrap()
|
|||
declare void @abort()
|
||||
|
||||
; CHECK-LABEL: f1:
|
||||
; CHECK: call abort@FUNCTION{{$}}
|
||||
; CHECK: call abort{{$}}
|
||||
; CHECK: unreachable
|
||||
define i32 @f1() {
|
||||
call void @abort()
|
||||
|
|
|
@ -11,10 +11,10 @@ declare i32 @has_ptr_arg(i8*)
|
|||
|
||||
; CHECK-LABEL: test_invalid_rtn:
|
||||
; CHECK: i32.const $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid.2@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid.2, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: i64.const $push[[L0:[0-9]+]]=, 0{{$}}
|
||||
; CHECK-NEXT: i64.call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i64.call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
define void @test_invalid_rtn() {
|
||||
|
@ -25,7 +25,7 @@ entry:
|
|||
}
|
||||
|
||||
; CHECK-LABEL: test_struct_rtn:
|
||||
; CHECK: call has_i64_arg@FUNCTION, $pop6, $pop0
|
||||
; CHECK: call has_i64_arg, $pop6, $pop0
|
||||
define void @test_struct_rtn() {
|
||||
call {i32, i32} bitcast (i32 (i64)* @has_i64_arg to {i32, i32} (i64)*)(i64 0)
|
||||
ret void
|
||||
|
@ -33,13 +33,13 @@ define void @test_struct_rtn() {
|
|||
|
||||
; CHECK-LABEL: test_invalid_arg:
|
||||
; CHECK: i32.const $push[[L0:[0-9]+]]=, 2{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid.4@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid.4, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, 2{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, has_ptr_arg@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, has_ptr_arg, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: i64.const $push[[L0:[0-9]+]]=, 3{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid@FUNCTION, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: i32.call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid, $pop[[L0]]{{$}}
|
||||
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
||||
; CHECK-NEXT: end_function
|
||||
define void @test_invalid_arg() {
|
||||
|
|
|
@ -20,7 +20,7 @@ define i32 @unused_second(i32 %x, i32 %y) {
|
|||
}
|
||||
|
||||
; CHECK-LABEL: call_something:
|
||||
; CHECK: {{^}} i32.call $drop=, return_something@FUNCTION{{$}}
|
||||
; CHECK: {{^}} i32.call $drop=, return_something{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
declare i32 @return_something()
|
||||
define void @call_something() {
|
||||
|
|
|
@ -10,11 +10,11 @@ declare void @ext_func_i32(i32* %ptr)
|
|||
; Check that there is an extra local for the stack pointer.
|
||||
; CHECK: .local i32{{$}}
|
||||
define void @alloca32() noredzone {
|
||||
; CHECK-NEXT: global.get $push[[L2:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK-NEXT: global.get $push[[L2:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L3:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L9:.+]]=, $pop[[L2]], $pop[[L3]]
|
||||
; CHECK-NEXT: local.tee $push[[L8:.+]]=, [[SP:.+]], $pop[[L9]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L8]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L8]]{{$}}
|
||||
%retval = alloca i32
|
||||
; CHECK: local.get $push[[L4:.+]]=, [[SP]]{{$}}
|
||||
; CHECK: i32.const $push[[L0:.+]]=, 0
|
||||
|
@ -23,14 +23,14 @@ define void @alloca32() noredzone {
|
|||
; CHECK: local.get $push[[L6:.+]]=, [[SP]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L5:.+]]=, 16
|
||||
; CHECK-NEXT: i32.add $push[[L7:.+]]=, $pop[[L6]], $pop[[L5]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L7]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L7]]
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-LABEL: alloca3264:
|
||||
; CHECK: .local i32{{$}}
|
||||
define void @alloca3264() {
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L4:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L6:.+]]=, $pop[[L3]], $pop[[L4]]
|
||||
; CHECK-NEXT: local.tee $push[[L5:.+]]=, [[SP:.+]], $pop[[L6]]
|
||||
|
@ -50,11 +50,11 @@ define void @alloca3264() {
|
|||
; CHECK-LABEL: allocarray:
|
||||
; CHECK: .local i32{{$}}
|
||||
define void @allocarray() {
|
||||
; CHECK-NEXT: global.get $push[[L4:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK-NEXT: global.get $push[[L4:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L5:.+]]=, 144{{$}}
|
||||
; CHECK-NEXT: i32.sub $push[[L12:.+]]=, $pop[[L4]], $pop[[L5]]
|
||||
; CHECK-NEXT: local.tee $push[[L11:.+]]=, 0, $pop[[L12]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L11]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L11]]
|
||||
%r = alloca [33 x i32]
|
||||
|
||||
; CHECK: i32.const $push{{.+}}=, 24
|
||||
|
@ -72,7 +72,7 @@ define void @allocarray() {
|
|||
; CHECK-NEXT: local.get $push[[L2:.+]]=, [[SP]]{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L7:.+]]=, 144
|
||||
; CHECK-NEXT: i32.add $push[[L8:.+]]=, $pop[[L2]], $pop[[L7]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L8]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L8]]
|
||||
ret void
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ define void @non_mem_use(i8** %addr) {
|
|||
; CHECK: i32.const $push[[L2:.+]]=, 48
|
||||
; CHECK-NEXT: i32.sub $push[[L12:.+]]=, {{.+}}, $pop[[L2]]
|
||||
; CHECK-NEXT: local.tee $push[[L11:.+]]=, [[SP:.+]], $pop[[L12]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L11]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L11]]
|
||||
%buf = alloca [27 x i8], align 16
|
||||
%r = alloca i64
|
||||
%r2 = alloca i64
|
||||
|
@ -89,11 +89,11 @@ define void @non_mem_use(i8** %addr) {
|
|||
; CHECK: local.get $push[[L3:.+]]=, [[SP]]
|
||||
; CHECK: i32.const $push[[OFF:.+]]=, 8
|
||||
; CHECK-NEXT: i32.add $push[[ARG1:.+]]=, $pop[[L3]], $pop[[OFF]]
|
||||
; CHECK-NEXT: call ext_func@FUNCTION, $pop[[ARG1]]
|
||||
; CHECK-NEXT: call ext_func, $pop[[ARG1]]
|
||||
call void @ext_func(i64* %r)
|
||||
; %r2 is at SP+0, no add needed
|
||||
; CHECK: local.get $push[[L4:.+]]=, [[SP]]
|
||||
; CHECK-NEXT: call ext_func@FUNCTION, $pop[[L4]]
|
||||
; CHECK-NEXT: call ext_func, $pop[[L4]]
|
||||
call void @ext_func(i64* %r2)
|
||||
; Use as a value, but in a store
|
||||
; %buf is at SP+16
|
||||
|
@ -109,11 +109,11 @@ define void @non_mem_use(i8** %addr) {
|
|||
; CHECK-LABEL: allocarray_inbounds:
|
||||
; CHECK: .local i32{{$}}
|
||||
define void @allocarray_inbounds() {
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L4:.+]]=, 32{{$}}
|
||||
; CHECK-NEXT: i32.sub $push[[L11:.+]]=, $pop[[L3]], $pop[[L4]]
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, [[SP:.+]], $pop[[L11]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L10]]{{$}}
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L10]]{{$}}
|
||||
%r = alloca [5 x i32]
|
||||
; CHECK: i32.const $push[[L3:.+]]=, 1
|
||||
; CHECK-DAG: i32.store 24(${{.+}}), $pop[[L3]]
|
||||
|
@ -127,29 +127,29 @@ define void @allocarray_inbounds() {
|
|||
; CHECK: call ext_func
|
||||
; CHECK: i32.const $push[[L5:.+]]=, 32{{$}}
|
||||
; CHECK-NEXT: i32.add $push[[L7:.+]]=, ${{.+}}, $pop[[L5]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L7]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L7]]
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-LABEL: dynamic_alloca:
|
||||
define void @dynamic_alloca(i32 %alloc) {
|
||||
; CHECK: global.get $push[[L13:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L13:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L12:.+]]=, [[SP:.+]], $pop[[L13]]{{$}}
|
||||
; Target independent codegen bumps the stack pointer.
|
||||
; CHECK: i32.sub
|
||||
; Check that SP is written back to memory after decrement
|
||||
; CHECK: global.set __stack_pointer@GLOBAL,
|
||||
; CHECK: global.set __stack_pointer,
|
||||
%r = alloca i32, i32 %alloc
|
||||
; Target-independent codegen also calculates the store addr
|
||||
; CHECK: call ext_func_i32@FUNCTION
|
||||
; CHECK: call ext_func_i32
|
||||
call void @ext_func_i32(i32* %r)
|
||||
; CHECK: global.set __stack_pointer@GLOBAL, $pop{{.+}}
|
||||
; CHECK: global.set __stack_pointer, $pop{{.+}}
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-LABEL: dynamic_alloca_redzone:
|
||||
define void @dynamic_alloca_redzone(i32 %alloc) {
|
||||
; CHECK: global.get $push[[L13:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L13:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L12:.+]]=, [[SP:.+]], $pop[[L13]]{{$}}
|
||||
; Target independent codegen bumps the stack pointer
|
||||
; CHECK: i32.sub
|
||||
|
@ -166,11 +166,11 @@ define void @dynamic_alloca_redzone(i32 %alloc) {
|
|||
; CHECK-LABEL: dynamic_static_alloca:
|
||||
define void @dynamic_static_alloca(i32 %alloc) noredzone {
|
||||
; Decrement SP in the prolog by the static amount and writeback to memory.
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: i32.const $push[[L12:.+]]=, 16
|
||||
; CHECK-NEXT: i32.sub $push[[L23:.+]]=, $pop[[L11]], $pop[[L12]]
|
||||
; CHECK-NEXT: local.tee $push[[L22:.+]]=, [[SP:.+]], $pop[[L23]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L22]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L22]]
|
||||
|
||||
; Alloc and write to a static alloca
|
||||
; CHECK: local.get $push[[L21:.+]]=, [[SP:.+]]
|
||||
|
@ -184,7 +184,7 @@ define void @dynamic_static_alloca(i32 %alloc) noredzone {
|
|||
; CHECK: i32.sub
|
||||
; CHECK: local.tee $push[[L16:.+]]=, [[dynamic_local:.+]], $pop{{.+}}
|
||||
; CHECK: local.tee $push[[L15:.+]]=, [[other:.+]], $pop[[L16]]{{$}}
|
||||
; CHECK: global.set __stack_pointer@GLOBAL, $pop[[L15]]{{$}}
|
||||
; CHECK: global.set __stack_pointer, $pop[[L15]]{{$}}
|
||||
%dynamic = alloca i32, i32 %alloc
|
||||
|
||||
; Ensure we don't modify the frame pointer after assigning it.
|
||||
|
@ -226,7 +226,7 @@ define void @dynamic_static_alloca(i32 %alloc) noredzone {
|
|||
; CHECK: local.get $push[[L24:.+]]=, [[FP]]{{$}}
|
||||
; CHECK: i32.const $push[[L18:.+]]=, 16
|
||||
; CHECK-NEXT: i32.add $push[[L19:.+]]=, $pop[[L24]], $pop[[L18]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L19]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L19]]
|
||||
ret void
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ declare void @llvm.stackrestore(i8*)
|
|||
|
||||
; CHECK-LABEL: llvm_stack_builtins:
|
||||
define void @llvm_stack_builtins(i32 %alloc) noredzone {
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, {{.+}}, $pop[[L11]]
|
||||
; CHECK-NEXT: local.set [[STACK:.+]], $pop[[L10]]
|
||||
%stack = call i8* @llvm.stacksave()
|
||||
|
@ -245,7 +245,7 @@ define void @llvm_stack_builtins(i32 %alloc) noredzone {
|
|||
%dynamic = alloca i32, i32 %alloc
|
||||
|
||||
; CHECK: local.get $push[[L12:.+]]=, [[STACK]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L12]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L12]]
|
||||
call void @llvm.stackrestore(i8* %stack)
|
||||
|
||||
ret void
|
||||
|
@ -256,7 +256,7 @@ define void @llvm_stack_builtins(i32 %alloc) noredzone {
|
|||
; moved after the stack pointer was updated for the dynamic alloca.
|
||||
; CHECK-LABEL: dynamic_alloca_nouse:
|
||||
define void @dynamic_alloca_nouse(i32 %alloc) noredzone {
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L11:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L10:.+]]=, {{.+}}, $pop[[L11]]
|
||||
; CHECK-NEXT: local.set [[FP:.+]], $pop[[L10]]
|
||||
%dynamic = alloca i32, i32 %alloc
|
||||
|
@ -264,7 +264,7 @@ define void @dynamic_alloca_nouse(i32 %alloc) noredzone {
|
|||
; CHECK-NOT: local.set [[FP]],
|
||||
|
||||
; CHECK: local.get $push[[L12:.+]]=, [[FP]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L12]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L12]]
|
||||
ret void
|
||||
}
|
||||
|
||||
|
@ -295,11 +295,11 @@ declare i8* @llvm.frameaddress(i32)
|
|||
|
||||
; Test __builtin_frame_address(0).
|
||||
; CHECK-LABEL: frameaddress_0:
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get $push[[L3:.+]]=, __stack_pointer{{$}}
|
||||
; CHECK-NEXT: local.tee $push[[L2:.+]]=, [[FP:.+]], $pop[[L3]]{{$}}
|
||||
; CHECK-NEXT: call use_i8_star@FUNCTION, $pop[[L2]]
|
||||
; CHECK-NEXT: call use_i8_star, $pop[[L2]]
|
||||
; CHECK-NEXT: local.get $push[[L5:.+]]=, [[FP]]
|
||||
; CHECK-NEXT: global.set __stack_pointer@GLOBAL, $pop[[L5]]
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop[[L5]]
|
||||
define void @frameaddress_0() {
|
||||
%t = call i8* @llvm.frameaddress(i32 0)
|
||||
call void @use_i8_star(i8* %t)
|
||||
|
@ -310,7 +310,7 @@ define void @frameaddress_0() {
|
|||
|
||||
; CHECK-LABEL: frameaddress_1:
|
||||
; CHECK: i32.const $push0=, 0{{$}}
|
||||
; CHECK-NEXT: call use_i8_star@FUNCTION, $pop0{{$}}
|
||||
; CHECK-NEXT: call use_i8_star, $pop0{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @frameaddress_1() {
|
||||
%t = call i8* @llvm.frameaddress(i32 1)
|
||||
|
@ -320,7 +320,7 @@ define void @frameaddress_1() {
|
|||
|
||||
; Test a stack address passed to an inline asm.
|
||||
; CHECK-LABEL: inline_asm:
|
||||
; CHECK: global.get {{.+}}, __stack_pointer@GLOBAL{{$}}
|
||||
; CHECK: global.get {{.+}}, __stack_pointer{{$}}
|
||||
; CHECK: #APP
|
||||
; CHECK-NEXT: # %{{[0-9]+}}{{$}}
|
||||
; CHECK-NEXT: #NO_APP
|
||||
|
|
|
@ -105,7 +105,7 @@ declare void @callee(...)
|
|||
|
||||
; CHECK-LABEL: caller_none:
|
||||
; CHECK: i32.const $push0=, 0
|
||||
; CHECK-NEXT: call callee@FUNCTION, $pop0
|
||||
; CHECK-NEXT: call callee, $pop0
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @caller_none() {
|
||||
call void (...) @callee()
|
||||
|
@ -149,7 +149,7 @@ declare void @callee_with_nonlegal_fixed(fp128, ...) nounwind
|
|||
; CHECK: i64.const $push[[L0:[0-9]+]]=, 0
|
||||
; CHECK: i64.const $push[[L1:[0-9]+]]=, 0
|
||||
; CHECK: i32.const $push[[L2:[0-9]+]]=, 0
|
||||
; CHECK: call callee_with_nonlegal_fixed@FUNCTION, $pop[[L0]], $pop[[L1]], $pop[[L2]]{{$}}
|
||||
; CHECK: call callee_with_nonlegal_fixed, $pop[[L0]], $pop[[L1]], $pop[[L2]]{{$}}
|
||||
define void @call_nonlegal_fixed() nounwind {
|
||||
call void (fp128, ...) @callee_with_nonlegal_fixed(fp128 0xL00000000000000000000000000000000)
|
||||
ret void
|
||||
|
|
Loading…
Reference in New Issue