diff options
| author | Dan Gohman <dan433584@gmail.com> | 2016-01-28 01:22:44 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2016-01-28 01:22:44 +0000 |
| commit | adf28177eb0495c60c4ad07a2f2c67ba2fc10dc1 (patch) | |
| tree | 9e9fddf696ee16e1fd275af1743e986b1084553f /llvm/test/CodeGen/WebAssembly/cfg-stackify.ll | |
| parent | 77351ba3ae1741d5f068af9d6860cc85ac93fbac (diff) | |
| download | bcm5719-llvm-adf28177eb0495c60c4ad07a2f2c67ba2fc10dc1.tar.gz bcm5719-llvm-adf28177eb0495c60c4ad07a2f2c67ba2fc10dc1.zip | |
[WebAssembly] Enhanced register stackification
This patch revamps the RegStackifier pass with a new tree traversal mechanism,
enabling three major new features:
- Stackification of values with multiple uses, using the result value of set_local
- More aggressive stackification of instructions with side effects
- Reordering operands in commutative instructions to enable more stackification.
llvm-svn: 259009
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/cfg-stackify.ll')
| -rw-r--r-- | llvm/test/CodeGen/WebAssembly/cfg-stackify.ll | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll index a1ff4ee30e0..24844422fd1 100644 --- a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll +++ b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll @@ -979,7 +979,7 @@ bb6: ; OPT-LABEL: test11: ; OPT: block{{$}} ; OPT-NEXT: block{{$}} -; OPT: br_if $0, 0{{$}} +; OPT: br_if $pop{{[0-9]+}}, 0{{$}} ; OPT-NEXT: block{{$}} ; OPT-NOT: block ; OPT: br_if $0, 0{{$}} @@ -1121,31 +1121,33 @@ bb7: ; CHECK-LABEL: test13: ; CHECK-NEXT: .local i32{{$}} ; CHECK: block{{$}} -; CHECK: br_if $pop4, 0{{$}} +; CHECK: br_if $pop5, 0{{$}} ; CHECK-NEXT: return{{$}} ; CHECK-NEXT: .LBB22_2: ; CHECK-NEXT: end_block{{$}} ; CHECK: block{{$}} -; CHECK-NEXT: br_if $0, 0{{$}} +; CHECK-NEXT: i32.const $push3=, 0{{$}} +; CHECK-NEXT: br_if $pop3, 0{{$}} ; CHECK: .LBB22_4: ; CHECK-NEXT: end_block{{$}} ; CHECK: block{{$}} -; CHECK: br_if $pop6, 0{{$}} +; CHECK: br_if $pop7, 0{{$}} ; CHECK-NEXT: end_block{{$}} ; CHECK-NEXT: unreachable{{$}} ; OPT-LABEL: test13: ; OPT-NEXT: .local i32{{$}} ; OPT: block{{$}} -; OPT: br_if $pop4, 0{{$}} +; OPT: br_if $pop5, 0{{$}} ; OPT-NEXT: return{{$}} ; OPT-NEXT: .LBB22_2: ; OPT-NEXT: end_block{{$}} ; OPT: block{{$}} -; OPT-NEXT: br_if $0, 0{{$}} +; OPT-NEXT: i32.const $push3=, 0{{$}} +; OPT-NEXT: br_if $pop3, 0{{$}} ; OPT: .LBB22_4: ; OPT-NEXT: end_block{{$}} ; OPT: block{{$}} -; OPT: br_if $pop6, 0{{$}} +; OPT: br_if $pop7, 0{{$}} ; OPT-NEXT: end_block{{$}} ; OPT-NEXT: unreachable{{$}} define void @test13() noinline optnone { |

