diff options
Diffstat (limited to 'test/torture-s/loop-3.c.s')
-rw-r--r-- | test/torture-s/loop-3.c.s | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/test/torture-s/loop-3.c.s b/test/torture-s/loop-3.c.s index 53a8f9953..60a757f77 100644 --- a/test/torture-s/loop-3.c.s +++ b/test/torture-s/loop-3.c.s @@ -9,11 +9,12 @@ g: # @g .result i32 .local i32 # BB#0: # %entry - i32.const $1=, 0 - i32.load $push0=, n($1) - i32.const $push1=, 1 - i32.add $push2=, $pop0, $pop1 - i32.store $discard=, n($1), $pop2 + i32.const $push0=, 0 + i32.const $push4=, 0 + i32.load $push1=, n($pop4) + i32.const $push2=, 1 + i32.add $push3=, $pop1, $pop2 + i32.store $discard=, n($pop0), $pop3 return $1 .endfunc .Lfunc_end0: @@ -26,20 +27,21 @@ g: # @g f: # @f .param i32 .result i32 - .local i32, i32 # BB#0: # %entry - i32.const $1=, 0 - i32.const $2=, 1 - i32.load $push0=, n($1) - i32.add $push1=, $pop0, $0 - i32.lt_s $push2=, $0, $2 - i32.select $push3=, $pop2, $0, $2 - i32.const $push4=, -1 - i32.xor $push5=, $pop3, $pop4 - i32.add $push6=, $pop1, $pop5 - i32.const $push7=, 2 - i32.add $push8=, $pop6, $pop7 - i32.store $discard=, n($1), $pop8 + i32.const $push0=, 0 + i32.const $push12=, 0 + i32.load $push1=, n($pop12) + i32.add $push2=, $pop1, $0 + i32.const $push3=, 1 + i32.lt_s $push4=, $0, $pop3 + i32.const $push11=, 1 + i32.select $push5=, $pop4, $0, $pop11 + i32.const $push6=, -1 + i32.xor $push7=, $pop5, $pop6 + i32.add $push8=, $pop2, $pop7 + i32.const $push9=, 2 + i32.add $push10=, $pop8, $pop9 + i32.store $discard=, n($pop0), $pop10 return $0 .endfunc .Lfunc_end1: @@ -51,17 +53,20 @@ f: # @f .type main,@function main: # @main .result i32 - .local i32, i32 + .local i32 # BB#0: # %entry - i32.const $0=, 0 - i32.load $1=, n($0) + i32.const $push5=, 0 + i32.const $push4=, 0 + i32.load $push0=, n($pop4) + tee_local $push3=, $0=, $pop0 + i32.const $push1=, 4 + i32.add $push2=, $pop3, $pop1 + i32.store $discard=, n($pop5), $pop2 block - i32.const $push0=, 4 - i32.add $push1=, $1, $pop0 - i32.store $discard=, n($0), $pop1 - br_if $1, 0 # 0: down to label0 + br_if $0, 0 # 0: down to label0 # BB#1: # %if.end - call exit@FUNCTION, $0 + i32.const $push6=, 0 + call exit@FUNCTION, $pop6 unreachable .LBB2_2: # %if.then end_block # label0: @@ -75,7 +80,7 @@ main: # @main .type n,@object .section .bss.n,"aw",@nobits .globl n - .align 2 + .p2align 2 n: .int32 0 # 0x0 .size n, 4 |