WebAssembly: update syntax

Summary:
Follow the same syntax as for the spec repo. Both have evolved slightly
independently and need to converge again.

This, along with wasmate changes, allows me to do the following:

  echo "int add(int a, int b) { return a + b; }" > add.c
  ./out/bin/clang -O2 -S --target=wasm32-unknown-unknown add.c -o add.wack
  ./experimental/prototype-wasmate/wasmate.py add.wack > add.wast
  ./sexpr-wasm-prototype/out/sexpr-wasm add.wast -o add.wasm
  ./sexpr-wasm-prototype/third_party/v8-native-prototype/v8/v8/out/Release/d8 -e "print(WASM.instantiateModule(readbuffer('add.wasm'), {print:print}).add(42, 1337));"

As you'd expect, the d8 shell prints out the right value.

Reviewers: sunfish

Subscribers: jfb, llvm-commits, dschuff

Differential Revision: http://reviews.llvm.org/D13712

llvm-svn: 250480
diff --git a/llvm/test/CodeGen/WebAssembly/phi.ll b/llvm/test/CodeGen/WebAssembly/phi.ll
index 9b1d506..107e872 100644
--- a/llvm/test/CodeGen/WebAssembly/phi.ll
+++ b/llvm/test/CodeGen/WebAssembly/phi.ll
@@ -8,11 +8,11 @@
 ; Basic phi triangle.
 
 ; CHECK-LABEL: test0:
-; CHECK: @0{{$}}
-; CHECK: set_local [[REG:@.*]], pop
-; CHECK: sdiv [[REG]], {{.*}}
+; CHECK: get_local 0{{$}}
+; CHECK: set_local [[REG:.*]], pop
+; CHECK: sdiv (get_local [[REG]]), {{.*}}
 ; CHECK: set_local [[REG]], pop
-; CHECK: return [[REG]]
+; CHECK: return (get_local [[REG]])
 define i32 @test0(i32 %p) {
 entry:
   %t = icmp slt i32 %p, 0
@@ -29,9 +29,9 @@
 
 ; CHECK-LABEL: test1:
 ; CHECK: BB1_1:
-; CHECK: [[REG1:@.*]]
-; CHECK: set_local [[REG0:@.*]], pop
-; CHECK: [[REG2:@.*]]
+; CHECK: get_local [[REG1:.*]]
+; CHECK: set_local [[REG0:.*]], pop
+; CHECK: get_local [[REG2:.*]]
 ; CHECK: set_local [[REG1]], pop
 ; CHECK: [[REG0]]
 ; CHECK: set_local [[REG2]], pop