1 ; RUN: llc < %s -asm-verbose=false | FileCheck %s
3 ; Test that phis are lowered.
5 target datalayout = "e-p:32:32-i64:64-n32:64-S128"
6 target triple = "wasm32-unknown-unknown"
11 ; CHECK: div_s $[[NUM0:[0-9]+]]=, $0, $pop[[NUM1:[0-9]+]]{{$}}
12 ; CHECK: return $[[NUM0]]{{$}}
13 define i32 @test0(i32 %p) {
15 %t = icmp slt i32 %p, 0
16 br i1 %t, label %true, label %done
21 %s = phi i32 [ %a, %true ], [ %p, %entry ]
29 ; CHECK: copy_local $[[NUM0:[0-9]+]]=, $[[NUM1:[0-9]+]]{{$}}
30 ; CHECK: copy_local $[[NUM1]]=, $[[NUM2:[0-9]+]]{{$}}
31 ; CHECK: copy_local $[[NUM2]]=, $[[NUM0]]{{$}}
32 define i32 @test1(i32 %n) {
37 %a = phi i32 [ 0, %entry ], [ %b, %loop ]
38 %b = phi i32 [ 1, %entry ], [ %a, %loop ]
39 %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]
41 %i.next = add i32 %i, 1
42 %t = icmp slt i32 %i.next, %n
43 br i1 %t, label %loop, label %exit