summaryrefslogtreecommitdiff
path: root/test/llvm_autogenerated/reg-stackify.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/llvm_autogenerated/reg-stackify.s')
-rw-r--r--test/llvm_autogenerated/reg-stackify.s376
1 files changed, 318 insertions, 58 deletions
diff --git a/test/llvm_autogenerated/reg-stackify.s b/test/llvm_autogenerated/reg-stackify.s
index e9544bb2c..cb813d3cc 100644
--- a/test/llvm_autogenerated/reg-stackify.s
+++ b/test/llvm_autogenerated/reg-stackify.s
@@ -3,6 +3,7 @@
.globl no0
.type no0,@function
no0:
+.Lfunc_begin0:
.param i32, i32
.result i32
i32.load $1=, 0($1)
@@ -16,6 +17,7 @@ no0:
.globl no1
.type no1,@function
no1:
+.Lfunc_begin1:
.param i32, i32
.result i32
i32.load $1=, 0($1)
@@ -29,12 +31,13 @@ no1:
.globl yes0
.type yes0,@function
yes0:
+.Lfunc_begin2:
.param i32, i32
.result i32
- i32.const $push1=, 0
- i32.store $drop=, 0($0), $pop1
- i32.load $push0=, 0($1)
- return $pop0
+ i32.const $push0=, 0
+ i32.store $drop=, 0($0), $pop0
+ i32.load $push1=, 0($1)
+ return $pop1
.endfunc
.Lfunc_end2:
.size yes0, .Lfunc_end2-yes0
@@ -42,6 +45,7 @@ yes0:
.globl yes1
.type yes1,@function
yes1:
+.Lfunc_begin3:
.param i32
.result i32
i32.load $push0=, 0($0)
@@ -50,60 +54,106 @@ yes1:
.Lfunc_end3:
.size yes1, .Lfunc_end3-yes1
+ .globl sink_trap
+ .type sink_trap,@function
+sink_trap:
+.Lfunc_begin4:
+ .param i32, i32, i32
+ .result i32
+ i32.const $push0=, 0
+ i32.store $drop=, 0($2), $pop0
+ i32.div_s $push1=, $0, $1
+ return $pop1
+ .endfunc
+.Lfunc_end4:
+ .size sink_trap, .Lfunc_end4-sink_trap
+
+ .globl sink_readnone_call
+ .type sink_readnone_call,@function
+sink_readnone_call:
+.Lfunc_begin5:
+ .param i32, i32, i32
+ .result i32
+ i32.const $push1=, 0
+ i32.store $drop=, 0($2), $pop1
+ i32.call $push0=, readnone_callee@FUNCTION
+ return $pop0
+ .endfunc
+.Lfunc_end5:
+ .size sink_readnone_call, .Lfunc_end5-sink_readnone_call
+
+ .globl no_sink_readonly_call
+ .type no_sink_readonly_call,@function
+no_sink_readonly_call:
+.Lfunc_begin6:
+ .param i32, i32, i32
+ .result i32
+ .local i32
+ i32.call $3=, readonly_callee@FUNCTION
+ i32.const $push0=, 0
+ i32.store $drop=, 0($2), $pop0
+ return $3
+ .endfunc
+.Lfunc_end6:
+ .size no_sink_readonly_call, .Lfunc_end6-no_sink_readonly_call
+
.globl stack_uses
.type stack_uses,@function
stack_uses:
+.Lfunc_begin7:
.param i32, i32, i32, i32
.result i32
block
i32.const $push13=, 1
- i32.lt_s $push0=, $0, $pop13
- i32.const $push1=, 2
- i32.lt_s $push2=, $1, $pop1
- i32.xor $push5=, $pop0, $pop2
+ i32.lt_s $push5=, $0, $pop13
+ i32.const $push0=, 2
+ i32.lt_s $push4=, $1, $pop0
+ i32.xor $push6=, $pop5, $pop4
i32.const $push12=, 1
- i32.lt_s $push3=, $2, $pop12
+ i32.lt_s $push2=, $2, $pop12
i32.const $push11=, 2
- i32.lt_s $push4=, $3, $pop11
- i32.xor $push6=, $pop3, $pop4
- i32.xor $push7=, $pop5, $pop6
+ i32.lt_s $push1=, $3, $pop11
+ i32.xor $push3=, $pop2, $pop1
+ i32.xor $push7=, $pop6, $pop3
i32.const $push10=, 1
i32.ne $push8=, $pop7, $pop10
br_if 0, $pop8
i32.const $push9=, 0
return $pop9
-.LBB4_2:
+.LBB7_2:
end_block
i32.const $push14=, 1
return $pop14
.endfunc
-.Lfunc_end4:
- .size stack_uses, .Lfunc_end4-stack_uses
+.Lfunc_end7:
+ .size stack_uses, .Lfunc_end7-stack_uses
.globl multiple_uses
.type multiple_uses,@function
multiple_uses:
+.Lfunc_begin8:
.param i32, i32, i32
.local i32
block
- i32.load $push0=, 0($2)
- tee_local $push3=, $3=, $pop0
- i32.ge_u $push1=, $pop3, $1
+ i32.load $push3=, 0($2)
+ tee_local $push2=, $3=, $pop3
+ i32.ge_u $push0=, $pop2, $1
+ br_if 0, $pop0
+ i32.lt_u $push1=, $3, $0
br_if 0, $pop1
- i32.lt_u $push2=, $3, $0
- br_if 0, $pop2
i32.store $drop=, 0($2), $3
-.LBB5_3:
+.LBB8_3:
end_block
return
.endfunc
-.Lfunc_end5:
- .size multiple_uses, .Lfunc_end5-multiple_uses
+.Lfunc_end8:
+ .size multiple_uses, .Lfunc_end8-multiple_uses
.hidden stackify_store_across_side_effects
.globl stackify_store_across_side_effects
.type stackify_store_across_side_effects,@function
stackify_store_across_side_effects:
+.Lfunc_begin9:
.param i32
.local i64
i64.const $push0=, 4611686018427387904
@@ -113,62 +163,66 @@ stackify_store_across_side_effects:
call evoke_side_effects@FUNCTION
return
.endfunc
-.Lfunc_end6:
- .size stackify_store_across_side_effects, .Lfunc_end6-stackify_store_across_side_effects
+.Lfunc_end9:
+ .size stackify_store_across_side_effects, .Lfunc_end9-stackify_store_across_side_effects
.globl div_tree
.type div_tree,@function
div_tree:
+.Lfunc_begin10:
.param i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32
.result i32
- i32.div_s $push0=, $0, $1
- i32.div_s $push1=, $2, $3
- i32.div_s $push2=, $pop0, $pop1
- i32.div_s $push3=, $4, $5
- i32.div_s $push4=, $6, $7
- i32.div_s $push5=, $pop3, $pop4
- i32.div_s $push6=, $pop2, $pop5
- i32.div_s $push7=, $8, $9
- i32.div_s $push8=, $10, $11
- i32.div_s $push9=, $pop7, $pop8
- i32.div_s $push10=, $12, $13
- i32.div_s $push11=, $14, $15
- i32.div_s $push12=, $pop10, $pop11
- i32.div_s $push13=, $pop9, $pop12
- i32.div_s $push14=, $pop6, $pop13
+ i32.div_s $push11=, $0, $1
+ i32.div_s $push10=, $2, $3
+ i32.div_s $push12=, $pop11, $pop10
+ i32.div_s $push8=, $4, $5
+ i32.div_s $push7=, $6, $7
+ i32.div_s $push9=, $pop8, $pop7
+ i32.div_s $push13=, $pop12, $pop9
+ i32.div_s $push4=, $8, $9
+ i32.div_s $push3=, $10, $11
+ i32.div_s $push5=, $pop4, $pop3
+ i32.div_s $push1=, $12, $13
+ i32.div_s $push0=, $14, $15
+ i32.div_s $push2=, $pop1, $pop0
+ i32.div_s $push6=, $pop5, $pop2
+ i32.div_s $push14=, $pop13, $pop6
return $pop14
.endfunc
-.Lfunc_end7:
- .size div_tree, .Lfunc_end7-div_tree
+.Lfunc_end10:
+ .size div_tree, .Lfunc_end10-div_tree
.globl simple_multiple_use
.type simple_multiple_use,@function
simple_multiple_use:
+.Lfunc_begin11:
.param i32, i32
- i32.mul $push0=, $1, $0
- tee_local $push1=, $0=, $pop0
- call use_a@FUNCTION, $pop1
- call use_b@FUNCTION, $0
+ i32.mul $push1=, $1, $0
+ tee_local $push0=, $1=, $pop1
+ call use_a@FUNCTION, $pop0
+ call use_b@FUNCTION, $1
return
.endfunc
-.Lfunc_end8:
- .size simple_multiple_use, .Lfunc_end8-simple_multiple_use
+.Lfunc_end11:
+ .size simple_multiple_use, .Lfunc_end11-simple_multiple_use
.globl multiple_uses_in_same_insn
.type multiple_uses_in_same_insn,@function
multiple_uses_in_same_insn:
+.Lfunc_begin12:
.param i32, i32
- i32.mul $push0=, $1, $0
- tee_local $push1=, $0=, $pop0
- call use_2@FUNCTION, $pop1, $0
+ i32.mul $push1=, $1, $0
+ tee_local $push0=, $1=, $pop1
+ call use_2@FUNCTION, $pop0, $1
return
.endfunc
-.Lfunc_end9:
- .size multiple_uses_in_same_insn, .Lfunc_end9-multiple_uses_in_same_insn
+.Lfunc_end12:
+ .size multiple_uses_in_same_insn, .Lfunc_end12-multiple_uses_in_same_insn
.globl commute
.type commute,@function
commute:
+.Lfunc_begin13:
.result i32
i32.call $push0=, red@FUNCTION
i32.call $push1=, green@FUNCTION
@@ -177,12 +231,13 @@ commute:
i32.add $push4=, $pop2, $pop3
return $pop4
.endfunc
-.Lfunc_end10:
- .size commute, .Lfunc_end10-commute
+.Lfunc_end13:
+ .size commute, .Lfunc_end13-commute
.globl no_stackify_past_use
.type no_stackify_past_use,@function
no_stackify_past_use:
+.Lfunc_begin14:
.param i32
.result i32
.local i32
@@ -190,11 +245,216 @@ no_stackify_past_use:
i32.const $push0=, 1
i32.add $push1=, $0, $pop0
i32.call $push2=, callee@FUNCTION, $pop1
+ i32.sub $push3=, $pop2, $1
+ i32.div_s $push4=, $pop3, $1
+ return $pop4
+ .endfunc
+.Lfunc_end14:
+ .size no_stackify_past_use, .Lfunc_end14-no_stackify_past_use
+
+ .globl commute_to_fix_ordering
+ .type commute_to_fix_ordering,@function
+commute_to_fix_ordering:
+.Lfunc_begin15:
+ .param i32
+ .result i32
+ .local i32
+ i32.call $push6=, callee@FUNCTION, $0
+ tee_local $push5=, $1=, $pop6
+ i32.const $push0=, 1
+ i32.add $push1=, $0, $pop0
+ i32.call $push2=, callee@FUNCTION, $pop1
i32.add $push3=, $1, $pop2
- i32.mul $push4=, $1, $pop3
+ i32.mul $push4=, $pop5, $pop3
return $pop4
.endfunc
-.Lfunc_end11:
- .size no_stackify_past_use, .Lfunc_end11-no_stackify_past_use
+.Lfunc_end15:
+ .size commute_to_fix_ordering, .Lfunc_end15-commute_to_fix_ordering
+
+ .globl multiple_defs
+ .type multiple_defs,@function
+multiple_defs:
+.Lfunc_begin16:
+ .param i32, i32, i32, i32, i32
+ .local f64, f64, f64, f64, f64
+ f64.const $6=, 0x0p0
+ i32.const $push3=, 1
+ i32.and $2=, $2, $pop3
+ i32.const $push12=, 1
+ i32.and $3=, $3, $pop12
+ f64.const $push11=, -0x1.62cc8f5c28f5cp13
+ f64.const $push9=, -0x1.e147ae147bp-3
+ i32.const $push5=, 2
+ i32.or $push6=, $1, $pop5
+ i32.const $push7=, 14
+ i32.eq $push8=, $pop6, $pop7
+ f64.select $5=, $pop11, $pop9, $pop8
+ f64.const $7=, 0x0p0
+.LBB16_1:
+ loop
+ block
+ f64.const $push14=, 0x1.73c083126e979p4
+ f64.ge $push0=, $7, $pop14
+ f64.ne $push1=, $7, $7
+ i32.or $push2=, $pop0, $pop1
+ br_if 0, $pop2
+ copy_local $8=, $6
+.LBB16_3:
+ loop
+ f64.const $push20=, -0x1.62cc8f5c28f5cp13
+ f64.const $push19=, -0x1p0
+ f64.add $push18=, $7, $pop19
+ tee_local $push17=, $9=, $pop18
+ f64.select $push4=, $pop20, $pop17, $2
+ copy_local $push16=, $8
+ tee_local $push15=, $6=, $pop16
+ f64.add $8=, $pop4, $pop15
+ block
+ br_if 0, $3
+ copy_local $9=, $5
+.LBB16_5:
+ end_block
+ f64.add $8=, $9, $8
+ f64.const $push21=, 0x1.73c083126e979p4
+ f64.lt $push10=, $7, $pop21
+ br_if 0, $pop10
+.LBB16_6:
+ end_loop
+ end_block
+ f64.const $push13=, 0x1p0
+ f64.add $7=, $7, $pop13
+ br 0
+.LBB16_7:
+ end_loop
+ .endfunc
+.Lfunc_end16:
+ .size multiple_defs, .Lfunc_end16-multiple_defs
+
+ .globl no_stackify_call_past_load
+ .type no_stackify_call_past_load,@function
+no_stackify_call_past_load:
+.Lfunc_begin17:
+ .result i32
+ .local i32, i32
+ i32.call $0=, red@FUNCTION
+ i32.const $push0=, 0
+ i32.load $1=, count($pop0)
+ i32.call $drop=, callee@FUNCTION, $0
+ return $1
+ .endfunc
+.Lfunc_end17:
+ .size no_stackify_call_past_load, .Lfunc_end17-no_stackify_call_past_load
+
+ .globl no_stackify_store_past_load
+ .type no_stackify_store_past_load,@function
+no_stackify_store_past_load:
+.Lfunc_begin18:
+ .param i32, i32, i32
+ .result i32
+ i32.store $1=, 0($1), $0
+ i32.load $2=, 0($2)
+ i32.call $drop=, callee@FUNCTION, $1
+ return $2
+ .endfunc
+.Lfunc_end18:
+ .size no_stackify_store_past_load, .Lfunc_end18-no_stackify_store_past_load
+
+ .globl store_past_invar_load
+ .type store_past_invar_load,@function
+store_past_invar_load:
+.Lfunc_begin19:
+ .param i32, i32, i32
+ .result i32
+ i32.store $push0=, 0($1), $0
+ i32.call $drop=, callee@FUNCTION, $pop0
+ i32.load $push1=, 0($2)
+ return $pop1
+ .endfunc
+.Lfunc_end19:
+ .size store_past_invar_load, .Lfunc_end19-store_past_invar_load
+
+ .globl ignore_dbg_value
+ .type ignore_dbg_value,@function
+ignore_dbg_value:
+.Lfunc_begin20:
+ unreachable
+ .endfunc
+.Lfunc_end20:
+ .size ignore_dbg_value, .Lfunc_end20-ignore_dbg_value
+
+ .globl no_stackify_past_epilogue
+ .type no_stackify_past_epilogue,@function
+no_stackify_past_epilogue:
+.Lfunc_begin21:
+ .result i32
+ .local i32, i32
+ i32.const $push3=, __stack_pointer
+ i32.const $push0=, __stack_pointer
+ i32.load $push1=, 0($pop0)
+ i32.const $push2=, 16
+ i32.sub $push9=, $pop1, $pop2
+ i32.store $push11=, 0($pop3), $pop9
+ tee_local $push10=, $0=, $pop11
+ i32.const $push7=, 12
+ i32.add $push8=, $pop10, $pop7
+ i32.call $1=, use_memory@FUNCTION, $pop8
+ i32.const $push6=, __stack_pointer
+ i32.const $push4=, 16
+ i32.add $push5=, $0, $pop4
+ i32.store $drop=, 0($pop6), $pop5
+ return $1
+ .endfunc
+.Lfunc_end21:
+ .size no_stackify_past_epilogue, .Lfunc_end21-no_stackify_past_epilogue
+
+ .globl stackify_indvar
+ .type stackify_indvar,@function
+stackify_indvar:
+.Lfunc_begin22:
+ .param i32, i32
+ .local i32
+ i32.const $2=, 0
+.LBB22_1:
+ loop
+ i32.load $push0=, 0($1)
+ i32.add $push1=, $2, $pop0
+ i32.store $drop=, 0($1), $pop1
+ i32.const $push5=, 1
+ i32.add $push4=, $2, $pop5
+ tee_local $push3=, $2=, $pop4
+ i32.ne $push2=, $0, $pop3
+ br_if 0, $pop2
+ end_loop
+ return
+ .endfunc
+.Lfunc_end22:
+ .size stackify_indvar, .Lfunc_end22-stackify_indvar
+
+ .globl stackpointer_dependency
+ .type stackpointer_dependency,@function
+stackpointer_dependency:
+.Lfunc_begin23:
+ .param i32
+ .result i32
+ .local i32
+ i32.const $push0=, __stack_pointer
+ i32.load $push2=, 0($pop0)
+ copy_local $push4=, $pop2
+ tee_local $push3=, $1=, $pop4
+ i32.call $0=, stackpointer_callee@FUNCTION, $0, $pop3
+ i32.const $push1=, __stack_pointer
+ i32.store $drop=, 0($pop1), $1
+ return $0
+ .endfunc
+.Lfunc_end23:
+ .size stackpointer_dependency, .Lfunc_end23-stackpointer_dependency
+ .hidden count
+ .type count,@object
+ .bss
+ .globl count
+ .p2align 2
+count:
+ .int32 0
+ .size count, 4