summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/select.ll
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-11-18 16:12:01 +0000
committerDan Gohman <dan433584@gmail.com>2015-11-18 16:12:01 +0000
commit4ba4816b9701aecbc757f7d806895e114908f309 (patch)
tree004f2a73e6ec83b57785b4ae0e671b8a59c20e89 /llvm/test/CodeGen/WebAssembly/select.ll
parent272d3f17fcaa1018ddc15eb5781ae6064c760e95 (diff)
downloadbcm5719-llvm-4ba4816b9701aecbc757f7d806895e114908f309.tar.gz
bcm5719-llvm-4ba4816b9701aecbc757f7d806895e114908f309.zip
[WebAssembly] Enable register coloring and register stackifying.
This also takes the push/pop syntax another step forward, introducing stack slot numbers to make it easier to see how expressions are connected. For example, the value pushed in $push7 is popped in $pop7. And, this begins an experiment with making get_local and set_local implicit when an operation directly uses or defines a register. This greatly reduces clutter. If this experiment succeeds, it may make sense to do this for const instructions as well. And, this introduces more special code for ARGUMENTS; hopefully this code will soon be obviated by proper support for live-in virtual registers. llvm-svn: 253465
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/select.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/select.ll20
1 files changed, 8 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/select.ll b/llvm/test/CodeGen/WebAssembly/select.ll
index 7371507db12..0fb7eaaa586 100644
--- a/llvm/test/CodeGen/WebAssembly/select.ll
+++ b/llvm/test/CodeGen/WebAssembly/select.ll
@@ -7,9 +7,8 @@ target datalayout = "e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: select_i32:
-; CHECK: i32.eq $push, (get_local 2), (get_local 3)
-; CHECK: set_local 4, $pop
-; CHECK: i32.select $push, (get_local 4), (get_local 0), (get_local 1)
+; CHECK: i32.eq $push[[NUM1:[0-9]+]], $2, $pop[[NUM0:[0-9]+]]{{$}}
+; CHECK: i32.select $push{{[0-9]+}}, $pop[[NUM1]], $0, $1
define i32 @select_i32(i32 %a, i32 %b, i32 %cond) {
%cc = icmp eq i32 %cond, 0
%result = select i1 %cc, i32 %a, i32 %b
@@ -17,9 +16,8 @@ define i32 @select_i32(i32 %a, i32 %b, i32 %cond) {
}
; CHECK-LABEL: select_i64:
-; CHECK: i32.eq $push, (get_local 2), (get_local 3)
-; CHECK: set_local 4, $pop
-; CHECK: i64.select $push, (get_local 4), (get_local 0), (get_local 1)
+; CHECK: i32.eq $push[[NUM1:[0-9]+]], $2, $pop[[NUM0:[0-9]+]]{{$}}
+; CHECK: i64.select $push{{[0-9]+}}, $pop[[NUM1]], $0, $1
define i64 @select_i64(i64 %a, i64 %b, i32 %cond) {
%cc = icmp eq i32 %cond, 0
%result = select i1 %cc, i64 %a, i64 %b
@@ -27,9 +25,8 @@ define i64 @select_i64(i64 %a, i64 %b, i32 %cond) {
}
; CHECK-LABEL: select_f32:
-; CHECK: i32.eq $push, (get_local 2), (get_local 3)
-; CHECK: set_local 4, $pop
-; CHECK: f32.select $push, (get_local 4), (get_local 0), (get_local 1)
+; CHECK: i32.eq $push[[NUM1:[0-9]+]], $2, $pop[[NUM0:[0-9]+]]{{$}}
+; CHECK: f32.select $push{{[0-9]+}}, $pop[[NUM1]], $0, $1
define float @select_f32(float %a, float %b, i32 %cond) {
%cc = icmp eq i32 %cond, 0
%result = select i1 %cc, float %a, float %b
@@ -37,9 +34,8 @@ define float @select_f32(float %a, float %b, i32 %cond) {
}
; CHECK-LABEL: select_f64:
-; CHECK: i32.eq $push, (get_local 2), (get_local 3)
-; CHECK: set_local 4, $pop
-; CHECK: f64.select $push, (get_local 4), (get_local 0), (get_local 1)
+; CHECK: i32.eq $push[[NUM1:[0-9]+]], $2, $pop[[NUM0:[0-9]+]]{{$}}
+; CHECK: f64.select $push{{[0-9]+}}, $pop[[NUM1]], $0, $1
define double @select_f64(double %a, double %b, i32 %cond) {
%cc = icmp eq i32 %cond, 0
%result = select i1 %cc, double %a, double %b
OpenPOWER on IntegriCloud