if (NumDefs != 0) {
const MachineOperand &MO = MI->getOperand(0);
unsigned Reg = MO.getReg();
- OS << "(setlocal @" << TargetRegisterInfo::virtReg2Index(Reg) << ' ';
+ OS << "(set_local @" << TargetRegisterInfo::virtReg2Index(Reg) << ' ';
}
if (MI->getOpcode() == WebAssembly::COPY) {
; CHECK-LABEL: (func $call_i32_nullary
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (call $i32_nullary))
+; CHECK-NEXT: (set_local @0 (call $i32_nullary))
; CHECK-NEXT: (return @0)
define i32 @call_i32_nullary() {
%r = call i32 @i32_nullary()
; CHECK-LABEL: (func $call_i64_nullary
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (call $i64_nullary))
+; CHECK-NEXT: (set_local @0 (call $i64_nullary))
; CHECK-NEXT: (return @0)
define i64 @call_i64_nullary() {
%r = call i64 @i64_nullary()
; CHECK-LABEL: (func $call_float_nullary
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (call $float_nullary))
+; CHECK-NEXT: (set_local @0 (call $float_nullary))
; CHECK-NEXT: (return @0)
define float @call_float_nullary() {
%r = call float @float_nullary()
; CHECK-LABEL: (func $call_double_nullary
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (call $double_nullary))
+; CHECK-NEXT: (set_local @0 (call $double_nullary))
; CHECK-NEXT: (return @0)
define double @call_double_nullary() {
%r = call double @double_nullary()
; CHECK-LABEL: (func $call_i32_unary
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (call $i32_unary @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (call $i32_unary @0))
; CHECK-NEXT: (return @1)
define i32 @call_i32_unary(i32 %a) {
%r = call i32 @i32_unary(i32 %a)
; CHECK-LABEL: (func $call_i32_binary
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (call $i32_binary @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (call $i32_binary @1 @0))
; CHECK-NEXT: (return @2)
define i32 @call_i32_binary(i32 %a, i32 %b) {
%r = call i32 @i32_binary(i32 %a, i32 %b)
; CHECK-LABEL: (func $call_indirect_void
; CHECK-NEXT: (param i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 0))
; CHECK-NEXT: (call_indirect @0)
; CHECK-NEXT: (return)
define void @call_indirect_void(void ()* %callee) {
; CHECK-LABEL: (func $call_indirect_i32
; CHECK-NEXT: (param i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (call_indirect @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (call_indirect @0))
; CHECK-NEXT: (return @1)
define i32 @call_indirect_i32(i32 ()* %callee) {
%t = call i32 %callee()
; CHECK-LABEL: (func $ord_f32
; CHECK-NEXT: (param f32) (param f32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (argument 1))
-; CHECK-NEXT: (setlocal @2 (eq @1 @1))
-; CHECK-NEXT: (setlocal @3 (eq @0 @0))
-; CHECK-NEXT: (setlocal @4 (and @3 @2))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (argument 1))
+; CHECK-NEXT: (set_local @2 (eq @1 @1))
+; CHECK-NEXT: (set_local @3 (eq @0 @0))
+; CHECK-NEXT: (set_local @4 (and @3 @2))
; CHECK-NEXT: (return @4)
define i32 @ord_f32(float %x, float %y) {
%a = fcmp ord float %x, %y
; CHECK-LABEL: (func $uno_f32
; CHECK-NEXT: (param f32) (param f32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (argument 1))
-; CHECK-NEXT: (setlocal @2 (ne @1 @1))
-; CHECK-NEXT: (setlocal @3 (ne @0 @0))
-; CHECK-NEXT: (setlocal @4 (ior @3 @2))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (argument 1))
+; CHECK-NEXT: (set_local @2 (ne @1 @1))
+; CHECK-NEXT: (set_local @3 (ne @0 @0))
+; CHECK-NEXT: (set_local @4 (ior @3 @2))
; CHECK-NEXT: (return @4)
define i32 @uno_f32(float %x, float %y) {
%a = fcmp uno float %x, %y
; CHECK-LABEL: (func $oeq_f32
; CHECK-NEXT: (param f32) (param f32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
; CHECK-NEXT: (return @2)
define i32 @oeq_f32(float %x, float %y) {
%a = fcmp oeq float %x, %y
}
; CHECK-LABEL: (func $une_f32
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @une_f32(float %x, float %y) {
%a = fcmp une float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $olt_f32
-; CHECK: (setlocal @2 (lt @1 @0))
+; CHECK: (set_local @2 (lt @1 @0))
define i32 @olt_f32(float %x, float %y) {
%a = fcmp olt float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ole_f32
-; CHECK: (setlocal @2 (le @1 @0))
+; CHECK: (set_local @2 (le @1 @0))
define i32 @ole_f32(float %x, float %y) {
%a = fcmp ole float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ogt_f32
-; CHECK: (setlocal @2 (gt @1 @0))
+; CHECK: (set_local @2 (gt @1 @0))
define i32 @ogt_f32(float %x, float %y) {
%a = fcmp ogt float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $oge_f32
-; CHECK: (setlocal @2 (ge @1 @0))
+; CHECK: (set_local @2 (ge @1 @0))
define i32 @oge_f32(float %x, float %y) {
%a = fcmp oge float %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: (func $ueq_f32
; CHECK-NEXT: (param f32) (param f32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
-; CHECK-NEXT: (setlocal @3 (ne @0 @0))
-; CHECK-NEXT: (setlocal @4 (ne @1 @1))
-; CHECK-NEXT: (setlocal @5 (ior @4 @3))
-; CHECK-NEXT: (setlocal @6 (ior @2 @5))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @3 (ne @0 @0))
+; CHECK-NEXT: (set_local @4 (ne @1 @1))
+; CHECK-NEXT: (set_local @5 (ior @4 @3))
+; CHECK-NEXT: (set_local @6 (ior @2 @5))
; CHECK-NEXT: (return @6)
define i32 @ueq_f32(float %x, float %y) {
%a = fcmp ueq float %x, %y
}
; CHECK-LABEL: (func $one_f32
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @one_f32(float %x, float %y) {
%a = fcmp one float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ult_f32
-; CHECK: (setlocal @2 (lt @1 @0))
+; CHECK: (set_local @2 (lt @1 @0))
define i32 @ult_f32(float %x, float %y) {
%a = fcmp ult float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ule_f32
-; CHECK: (setlocal @2 (le @1 @0))
+; CHECK: (set_local @2 (le @1 @0))
define i32 @ule_f32(float %x, float %y) {
%a = fcmp ule float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ugt_f32
-; CHECK: (setlocal @2 (gt @1 @0))
+; CHECK: (set_local @2 (gt @1 @0))
define i32 @ugt_f32(float %x, float %y) {
%a = fcmp ugt float %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $uge_f32
-; CHECK: (setlocal @2 (ge @1 @0))
+; CHECK: (set_local @2 (ge @1 @0))
define i32 @uge_f32(float %x, float %y) {
%a = fcmp uge float %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: (func $ord_f64
; CHECK-NEXT: (param f64) (param f64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (argument 1))
-; CHECK-NEXT: (setlocal @2 (eq @1 @1))
-; CHECK-NEXT: (setlocal @3 (eq @0 @0))
-; CHECK-NEXT: (setlocal @4 (and @3 @2))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (argument 1))
+; CHECK-NEXT: (set_local @2 (eq @1 @1))
+; CHECK-NEXT: (set_local @3 (eq @0 @0))
+; CHECK-NEXT: (set_local @4 (and @3 @2))
; CHECK-NEXT: (return @4)
define i32 @ord_f64(double %x, double %y) {
%a = fcmp ord double %x, %y
; CHECK-LABEL: (func $uno_f64
; CHECK-NEXT: (param f64) (param f64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (argument 1))
-; CHECK-NEXT: (setlocal @2 (ne @1 @1))
-; CHECK-NEXT: (setlocal @3 (ne @0 @0))
-; CHECK-NEXT: (setlocal @4 (ior @3 @2))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (argument 1))
+; CHECK-NEXT: (set_local @2 (ne @1 @1))
+; CHECK-NEXT: (set_local @3 (ne @0 @0))
+; CHECK-NEXT: (set_local @4 (ior @3 @2))
; CHECK-NEXT: (return @4)
define i32 @uno_f64(double %x, double %y) {
%a = fcmp uno double %x, %y
; CHECK-LABEL: (func $oeq_f64
; CHECK-NEXT: (param f64) (param f64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
; CHECK-NEXT: (return @2)
define i32 @oeq_f64(double %x, double %y) {
%a = fcmp oeq double %x, %y
}
; CHECK-LABEL: (func $une_f64
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @une_f64(double %x, double %y) {
%a = fcmp une double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $olt_f64
-; CHECK: (setlocal @2 (lt @1 @0))
+; CHECK: (set_local @2 (lt @1 @0))
define i32 @olt_f64(double %x, double %y) {
%a = fcmp olt double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ole_f64
-; CHECK: (setlocal @2 (le @1 @0))
+; CHECK: (set_local @2 (le @1 @0))
define i32 @ole_f64(double %x, double %y) {
%a = fcmp ole double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ogt_f64
-; CHECK: (setlocal @2 (gt @1 @0))
+; CHECK: (set_local @2 (gt @1 @0))
define i32 @ogt_f64(double %x, double %y) {
%a = fcmp ogt double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $oge_f64
-; CHECK: (setlocal @2 (ge @1 @0))
+; CHECK: (set_local @2 (ge @1 @0))
define i32 @oge_f64(double %x, double %y) {
%a = fcmp oge double %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: (func $ueq_f64
; CHECK-NEXT: (param f64) (param f64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
-; CHECK-NEXT: (setlocal @3 (ne @0 @0))
-; CHECK-NEXT: (setlocal @4 (ne @1 @1))
-; CHECK-NEXT: (setlocal @5 (ior @4 @3))
-; CHECK-NEXT: (setlocal @6 (ior @2 @5))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @3 (ne @0 @0))
+; CHECK-NEXT: (set_local @4 (ne @1 @1))
+; CHECK-NEXT: (set_local @5 (ior @4 @3))
+; CHECK-NEXT: (set_local @6 (ior @2 @5))
; CHECK-NEXT: (return @6)
define i32 @ueq_f64(double %x, double %y) {
%a = fcmp ueq double %x, %y
}
; CHECK-LABEL: (func $one_f64
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @one_f64(double %x, double %y) {
%a = fcmp one double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ult_f64
-; CHECK: (setlocal @2 (lt @1 @0))
+; CHECK: (set_local @2 (lt @1 @0))
define i32 @ult_f64(double %x, double %y) {
%a = fcmp ult double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ule_f64
-; CHECK: (setlocal @2 (le @1 @0))
+; CHECK: (set_local @2 (le @1 @0))
define i32 @ule_f64(double %x, double %y) {
%a = fcmp ule double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ugt_f64
-; CHECK: (setlocal @2 (gt @1 @0))
+; CHECK: (set_local @2 (gt @1 @0))
define i32 @ugt_f64(double %x, double %y) {
%a = fcmp ugt double %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $uge_f64
-; CHECK: (setlocal @2 (ge @1 @0))
+; CHECK: (set_local @2 (ge @1 @0))
define i32 @uge_f64(double %x, double %y) {
%a = fcmp uge double %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: (func $eq_i32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
; CHECK-NEXT: (return @2)
define i32 @eq_i32(i32 %x, i32 %y) {
%a = icmp eq i32 %x, %y
}
; CHECK-LABEL: (func $ne_i32
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @ne_i32(i32 %x, i32 %y) {
%a = icmp ne i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $slt_i32
-; CHECK: (setlocal @2 (slt @1 @0))
+; CHECK: (set_local @2 (slt @1 @0))
define i32 @slt_i32(i32 %x, i32 %y) {
%a = icmp slt i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sle_i32
-; CHECK: (setlocal @2 (sle @1 @0))
+; CHECK: (set_local @2 (sle @1 @0))
define i32 @sle_i32(i32 %x, i32 %y) {
%a = icmp sle i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ult_i32
-; CHECK: (setlocal @2 (ult @1 @0))
+; CHECK: (set_local @2 (ult @1 @0))
define i32 @ult_i32(i32 %x, i32 %y) {
%a = icmp ult i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ule_i32
-; CHECK: (setlocal @2 (ule @1 @0))
+; CHECK: (set_local @2 (ule @1 @0))
define i32 @ule_i32(i32 %x, i32 %y) {
%a = icmp ule i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sgt_i32
-; CHECK: (setlocal @2 (sgt @1 @0))
+; CHECK: (set_local @2 (sgt @1 @0))
define i32 @sgt_i32(i32 %x, i32 %y) {
%a = icmp sgt i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sge_i32
-; CHECK: (setlocal @2 (sge @1 @0))
+; CHECK: (set_local @2 (sge @1 @0))
define i32 @sge_i32(i32 %x, i32 %y) {
%a = icmp sge i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ugt_i32
-; CHECK: (setlocal @2 (ugt @1 @0))
+; CHECK: (set_local @2 (ugt @1 @0))
define i32 @ugt_i32(i32 %x, i32 %y) {
%a = icmp ugt i32 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $uge_i32
-; CHECK: (setlocal @2 (uge @1 @0))
+; CHECK: (set_local @2 (uge @1 @0))
define i32 @uge_i32(i32 %x, i32 %y) {
%a = icmp uge i32 %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: (func $eq_i64
; CHECK-NEXT: (param i64) (param i64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (eq @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (eq @1 @0))
; CHECK-NEXT: (return @2)
define i32 @eq_i64(i64 %x, i64 %y) {
%a = icmp eq i64 %x, %y
}
; CHECK-LABEL: (func $ne_i64
-; CHECK: (setlocal @2 (ne @1 @0))
+; CHECK: (set_local @2 (ne @1 @0))
define i32 @ne_i64(i64 %x, i64 %y) {
%a = icmp ne i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $slt_i64
-; CHECK: (setlocal @2 (slt @1 @0))
+; CHECK: (set_local @2 (slt @1 @0))
define i32 @slt_i64(i64 %x, i64 %y) {
%a = icmp slt i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sle_i64
-; CHECK: (setlocal @2 (sle @1 @0))
+; CHECK: (set_local @2 (sle @1 @0))
define i32 @sle_i64(i64 %x, i64 %y) {
%a = icmp sle i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ult_i64
-; CHECK: (setlocal @2 (ult @1 @0))
+; CHECK: (set_local @2 (ult @1 @0))
define i32 @ult_i64(i64 %x, i64 %y) {
%a = icmp ult i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ule_i64
-; CHECK: (setlocal @2 (ule @1 @0))
+; CHECK: (set_local @2 (ule @1 @0))
define i32 @ule_i64(i64 %x, i64 %y) {
%a = icmp ule i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sgt_i64
-; CHECK: (setlocal @2 (sgt @1 @0))
+; CHECK: (set_local @2 (sgt @1 @0))
define i32 @sgt_i64(i64 %x, i64 %y) {
%a = icmp sgt i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $sge_i64
-; CHECK: (setlocal @2 (sge @1 @0))
+; CHECK: (set_local @2 (sge @1 @0))
define i32 @sge_i64(i64 %x, i64 %y) {
%a = icmp sge i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $ugt_i64
-; CHECK: (setlocal @2 (ugt @1 @0))
+; CHECK: (set_local @2 (ugt @1 @0))
define i32 @ugt_i64(i64 %x, i64 %y) {
%a = icmp ugt i64 %x, %y
%b = zext i1 %a to i32
}
; CHECK-LABEL: (func $uge_i64
-; CHECK: (setlocal @2 (uge @1 @0))
+; CHECK: (set_local @2 (uge @1 @0))
define i32 @uge_i64(i64 %x, i64 %y) {
%a = icmp uge i64 %x, %y
%b = zext i1 %a to i32
; CHECK-LABEL: $wrap_i64_i32
; CHECK-NEXT: (param i64) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (wrap_i64 @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (wrap_i64 @0))
; CHECK-NEXT: (return @1)
define i32 @wrap_i64_i32(i64 %x) {
%a = trunc i64 %x to i32
; CHECK-LABEL: (func $fadd32
; CHECK-NEXT: (param f32) (param f32) (result f32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (fadd @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (fadd @1 @0))
; CHECK-NEXT: (return @2)
define float @fadd32(float %x, float %y) {
%a = fadd float %x, %y
}
; CHECK-LABEL: (func $fsub32
-; CHECK: (setlocal @2 (fsub @1 @0))
+; CHECK: (set_local @2 (fsub @1 @0))
define float @fsub32(float %x, float %y) {
%a = fsub float %x, %y
ret float %a
}
; CHECK-LABEL: (func $fmul32
-; CHECK: (setlocal @2 (fmul @1 @0))
+; CHECK: (set_local @2 (fmul @1 @0))
define float @fmul32(float %x, float %y) {
%a = fmul float %x, %y
ret float %a
}
; CHECK-LABEL: (func $fdiv32
-; CHECK: (setlocal @2 (fdiv @1 @0))
+; CHECK: (set_local @2 (fdiv @1 @0))
define float @fdiv32(float %x, float %y) {
%a = fdiv float %x, %y
ret float %a
}
; CHECK-LABEL: (func $fabs32
-; CHECK: (setlocal @1 (fabs @0))
+; CHECK: (set_local @1 (fabs @0))
define float @fabs32(float %x) {
%a = call float @llvm.fabs.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $fneg32
-; CHECK: (setlocal @1 (fneg @0))
+; CHECK: (set_local @1 (fneg @0))
define float @fneg32(float %x) {
%a = fsub float -0., %x
ret float %a
}
; CHECK-LABEL: (func $copysign32
-; CHECK: (setlocal @2 (copysign @1 @0))
+; CHECK: (set_local @2 (copysign @1 @0))
define float @copysign32(float %x, float %y) {
%a = call float @llvm.copysign.f32(float %x, float %y)
ret float %a
}
; CHECK-LABEL: (func $sqrt32
-; CHECK: (setlocal @1 (sqrt @0))
+; CHECK: (set_local @1 (sqrt @0))
define float @sqrt32(float %x) {
%a = call float @llvm.sqrt.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $ceil32
-; CHECK: (setlocal @1 (ceil @0))
+; CHECK: (set_local @1 (ceil @0))
define float @ceil32(float %x) {
%a = call float @llvm.ceil.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $floor32
-; CHECK: (setlocal @1 (floor @0))
+; CHECK: (set_local @1 (floor @0))
define float @floor32(float %x) {
%a = call float @llvm.floor.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $trunc32
-; CHECK: (setlocal @1 (trunc @0))
+; CHECK: (set_local @1 (trunc @0))
define float @trunc32(float %x) {
%a = call float @llvm.trunc.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $nearest32
-; CHECK: (setlocal @1 (nearest @0))
+; CHECK: (set_local @1 (nearest @0))
define float @nearest32(float %x) {
%a = call float @llvm.nearbyint.f32(float %x)
ret float %a
}
; CHECK-LABEL: (func $nearest32_via_rint
-; CHECK: (setlocal @1 (nearest @0))
+; CHECK: (set_local @1 (nearest @0))
define float @nearest32_via_rint(float %x) {
%a = call float @llvm.rint.f32(float %x)
ret float %a
; CHECK-LABEL: (func $fadd64
; CHECK-NEXT: (param f64) (param f64) (result f64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (fadd @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (fadd @1 @0))
; CHECK-NEXT: (return @2)
define double @fadd64(double %x, double %y) {
%a = fadd double %x, %y
}
; CHECK-LABEL: (func $fsub64
-; CHECK: (setlocal @2 (fsub @1 @0))
+; CHECK: (set_local @2 (fsub @1 @0))
define double @fsub64(double %x, double %y) {
%a = fsub double %x, %y
ret double %a
}
; CHECK-LABEL: (func $fmul64
-; CHECK: (setlocal @2 (fmul @1 @0))
+; CHECK: (set_local @2 (fmul @1 @0))
define double @fmul64(double %x, double %y) {
%a = fmul double %x, %y
ret double %a
}
; CHECK-LABEL: (func $fdiv64
-; CHECK: (setlocal @2 (fdiv @1 @0))
+; CHECK: (set_local @2 (fdiv @1 @0))
define double @fdiv64(double %x, double %y) {
%a = fdiv double %x, %y
ret double %a
}
; CHECK-LABEL: (func $fabs64
-; CHECK: (setlocal @1 (fabs @0))
+; CHECK: (set_local @1 (fabs @0))
define double @fabs64(double %x) {
%a = call double @llvm.fabs.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $fneg64
-; CHECK: (setlocal @1 (fneg @0))
+; CHECK: (set_local @1 (fneg @0))
define double @fneg64(double %x) {
%a = fsub double -0., %x
ret double %a
}
; CHECK-LABEL: (func $copysign64
-; CHECK: (setlocal @2 (copysign @1 @0))
+; CHECK: (set_local @2 (copysign @1 @0))
define double @copysign64(double %x, double %y) {
%a = call double @llvm.copysign.f64(double %x, double %y)
ret double %a
}
; CHECK-LABEL: (func $sqrt64
-; CHECK: (setlocal @1 (sqrt @0))
+; CHECK: (set_local @1 (sqrt @0))
define double @sqrt64(double %x) {
%a = call double @llvm.sqrt.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $ceil64
-; CHECK: (setlocal @1 (ceil @0))
+; CHECK: (set_local @1 (ceil @0))
define double @ceil64(double %x) {
%a = call double @llvm.ceil.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $floor64
-; CHECK: (setlocal @1 (floor @0))
+; CHECK: (set_local @1 (floor @0))
define double @floor64(double %x) {
%a = call double @llvm.floor.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $trunc64
-; CHECK: (setlocal @1 (trunc @0))
+; CHECK: (set_local @1 (trunc @0))
define double @trunc64(double %x) {
%a = call double @llvm.trunc.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $nearest64
-; CHECK: (setlocal @1 (nearest @0))
+; CHECK: (set_local @1 (nearest @0))
define double @nearest64(double %x) {
%a = call double @llvm.nearbyint.f64(double %x)
ret double %a
}
; CHECK-LABEL: (func $nearest64_via_rint
-; CHECK: (setlocal @1 (nearest @0))
+; CHECK: (set_local @1 (nearest @0))
define double @nearest64_via_rint(double %x) {
%a = call double @llvm.rint.f64(double %x)
ret double %a
; CHECK-LABEL: (func $f1{{$}}
; CHECK-NEXT: (result i32){{$}}
-; CHECK-NEXT: (setlocal @0 (immediate 0)){{$}}
+; CHECK-NEXT: (set_local @0 (immediate 0)){{$}}
; CHECK-NEXT: (return @0){{$}}
; CHECK-NEXT: ) ;; end func $f1{{$}}
define i32 @f1() {
; CHECK-LABEL: (func $f2{{$}}
; CHECK-NEXT: (param i32) (param f32) (result i32){{$}}
-; CHECK-NEXT: (setlocal @0 (immediate 0)){{$}}
+; CHECK-NEXT: (set_local @0 (immediate 0)){{$}}
; CHECK-NEXT: (return @0){{$}}
; CHECK-NEXT: ) ;; end func $f2{{$}}
define i32 @f2(i32 %p1, float %p2) {
; CHECK-LABEL: (func $add32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (add @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (add @1 @0))
; CHECK-NEXT: (return @2)
define i32 @add32(i32 %x, i32 %y) {
%a = add i32 %x, %y
; CHECK-LABEL: (func $sub32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (sub @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (sub @1 @0))
; CHECK-NEXT: (return @2)
define i32 @sub32(i32 %x, i32 %y) {
%a = sub i32 %x, %y
; CHECK-LABEL: (func $mul32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (mul @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (mul @1 @0))
; CHECK-NEXT: (return @2)
define i32 @mul32(i32 %x, i32 %y) {
%a = mul i32 %x, %y
; CHECK-LABEL: (func $sdiv32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (sdiv @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (sdiv @1 @0))
; CHECK-NEXT: (return @2)
define i32 @sdiv32(i32 %x, i32 %y) {
%a = sdiv i32 %x, %y
; CHECK-LABEL: (func $udiv32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (udiv @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (udiv @1 @0))
; CHECK-NEXT: (return @2)
define i32 @udiv32(i32 %x, i32 %y) {
%a = udiv i32 %x, %y
; CHECK-LABEL: (func $srem32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (srem @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (srem @1 @0))
; CHECK-NEXT: (return @2)
define i32 @srem32(i32 %x, i32 %y) {
%a = srem i32 %x, %y
; CHECK-LABEL: (func $urem32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (urem @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (urem @1 @0))
; CHECK-NEXT: (return @2)
define i32 @urem32(i32 %x, i32 %y) {
%a = urem i32 %x, %y
; CHECK-LABEL: (func $and32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (and @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (and @1 @0))
; CHECK-NEXT: (return @2)
define i32 @and32(i32 %x, i32 %y) {
%a = and i32 %x, %y
; CHECK-LABEL: (func $ior32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (ior @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (ior @1 @0))
; CHECK-NEXT: (return @2)
define i32 @ior32(i32 %x, i32 %y) {
%a = or i32 %x, %y
; CHECK-LABEL: (func $xor32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (xor @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (xor @1 @0))
; CHECK-NEXT: (return @2)
define i32 @xor32(i32 %x, i32 %y) {
%a = xor i32 %x, %y
; CHECK-LABEL: (func $shl32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shl @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shl @1 @0))
; CHECK-NEXT: (return @2)
define i32 @shl32(i32 %x, i32 %y) {
%a = shl i32 %x, %y
; CHECK-LABEL: (func $shr32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shr_u @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shr_u @1 @0))
; CHECK-NEXT: (return @2)
define i32 @shr32(i32 %x, i32 %y) {
%a = lshr i32 %x, %y
; CHECK-LABEL: (func $sar32
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shr_s @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shr_s @1 @0))
; CHECK-NEXT: (return @2)
define i32 @sar32(i32 %x, i32 %y) {
%a = ashr i32 %x, %y
; CHECK-LABEL: (func $clz32
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (clz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (clz @0))
; CHECK-NEXT: (return @1)
define i32 @clz32(i32 %x) {
%a = call i32 @llvm.ctlz.i32(i32 %x, i1 false)
; CHECK-LABEL: (func $clz32_zero_undef
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (clz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (clz @0))
; CHECK-NEXT: (return @1)
define i32 @clz32_zero_undef(i32 %x) {
%a = call i32 @llvm.ctlz.i32(i32 %x, i1 true)
; CHECK-LABEL: (func $ctz32
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (ctz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (ctz @0))
; CHECK-NEXT: (return @1)
define i32 @ctz32(i32 %x) {
%a = call i32 @llvm.cttz.i32(i32 %x, i1 false)
; CHECK-LABEL: (func $ctz32_zero_undef
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (ctz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (ctz @0))
; CHECK-NEXT: (return @1)
define i32 @ctz32_zero_undef(i32 %x) {
%a = call i32 @llvm.cttz.i32(i32 %x, i1 true)
; CHECK-LABEL: (func $popcnt32
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (popcnt @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (popcnt @0))
; CHECK-NEXT: (return @1)
define i32 @popcnt32(i32 %x) {
%a = call i32 @llvm.ctpop.i32(i32 %x)
; CHECK-LABEL: (func $add64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (add @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (add @1 @0))
; CHECK-NEXT: (return @2)
define i64 @add64(i64 %x, i64 %y) {
%a = add i64 %x, %y
; CHECK-LABEL: (func $sub64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (sub @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (sub @1 @0))
; CHECK-NEXT: (return @2)
define i64 @sub64(i64 %x, i64 %y) {
%a = sub i64 %x, %y
; CHECK-LABEL: (func $mul64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (mul @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (mul @1 @0))
; CHECK-NEXT: (return @2)
define i64 @mul64(i64 %x, i64 %y) {
%a = mul i64 %x, %y
; CHECK-LABEL: (func $sdiv64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (sdiv @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (sdiv @1 @0))
; CHECK-NEXT: (return @2)
define i64 @sdiv64(i64 %x, i64 %y) {
%a = sdiv i64 %x, %y
; CHECK-LABEL: (func $udiv64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (udiv @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (udiv @1 @0))
; CHECK-NEXT: (return @2)
define i64 @udiv64(i64 %x, i64 %y) {
%a = udiv i64 %x, %y
; CHECK-LABEL: (func $srem64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (srem @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (srem @1 @0))
; CHECK-NEXT: (return @2)
define i64 @srem64(i64 %x, i64 %y) {
%a = srem i64 %x, %y
; CHECK-LABEL: (func $urem64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (urem @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (urem @1 @0))
; CHECK-NEXT: (return @2)
define i64 @urem64(i64 %x, i64 %y) {
%a = urem i64 %x, %y
; CHECK-LABEL: (func $and64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (and @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (and @1 @0))
; CHECK-NEXT: (return @2)
define i64 @and64(i64 %x, i64 %y) {
%a = and i64 %x, %y
; CHECK-LABEL: (func $ior64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (ior @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (ior @1 @0))
; CHECK-NEXT: (return @2)
define i64 @ior64(i64 %x, i64 %y) {
%a = or i64 %x, %y
; CHECK-LABEL: (func $xor64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (xor @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (xor @1 @0))
; CHECK-NEXT: (return @2)
define i64 @xor64(i64 %x, i64 %y) {
%a = xor i64 %x, %y
; CHECK-LABEL: (func $shl64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shl @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shl @1 @0))
; CHECK-NEXT: (return @2)
define i64 @shl64(i64 %x, i64 %y) {
%a = shl i64 %x, %y
; CHECK-LABEL: (func $shr64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shr_u @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shr_u @1 @0))
; CHECK-NEXT: (return @2)
define i64 @shr64(i64 %x, i64 %y) {
%a = lshr i64 %x, %y
; CHECK-LABEL: (func $sar64
; CHECK-NEXT: (param i64) (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
-; CHECK-NEXT: (setlocal @2 (shr_s @1 @0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
+; CHECK-NEXT: (set_local @2 (shr_s @1 @0))
; CHECK-NEXT: (return @2)
define i64 @sar64(i64 %x, i64 %y) {
%a = ashr i64 %x, %y
; CHECK-LABEL: (func $clz64
; CHECK-NEXT: (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (clz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (clz @0))
; CHECK-NEXT: (return @1)
define i64 @clz64(i64 %x) {
%a = call i64 @llvm.ctlz.i64(i64 %x, i1 false)
; CHECK-LABEL: (func $clz64_zero_undef
; CHECK-NEXT: (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (clz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (clz @0))
; CHECK-NEXT: (return @1)
define i64 @clz64_zero_undef(i64 %x) {
%a = call i64 @llvm.ctlz.i64(i64 %x, i1 true)
; CHECK-LABEL: (func $ctz64
; CHECK-NEXT: (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (ctz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (ctz @0))
; CHECK-NEXT: (return @1)
define i64 @ctz64(i64 %x) {
%a = call i64 @llvm.cttz.i64(i64 %x, i1 false)
; CHECK-LABEL: (func $ctz64_zero_undef
; CHECK-NEXT: (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (ctz @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (ctz @0))
; CHECK-NEXT: (return @1)
define i64 @ctz64_zero_undef(i64 %x) {
%a = call i64 @llvm.cttz.i64(i64 %x, i1 true)
; CHECK-LABEL: (func $popcnt64
; CHECK-NEXT: (param i64) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (popcnt @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (popcnt @0))
; CHECK-NEXT: (return @1)
define i64 @popcnt64(i64 %x) {
%a = call i64 @llvm.ctpop.i64(i64 %x)
; CHECK-LABEL: (func $zero_i32
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (immediate 0))
+; CHECK-NEXT: (set_local @0 (immediate 0))
; CHECK-NEXT: (return @0)
define i32 @zero_i32() {
ret i32 0
; CHECK-LABEL: (func $one_i32
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (immediate 1))
+; CHECK-NEXT: (set_local @0 (immediate 1))
; CHECK-NEXT: (return @0)
define i32 @one_i32() {
ret i32 1
; CHECK-LABEL: (func $max_i32
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (immediate 2147483647))
+; CHECK-NEXT: (set_local @0 (immediate 2147483647))
; CHECK-NEXT: (return @0)
define i32 @max_i32() {
ret i32 2147483647
; CHECK-LABEL: (func $min_i32
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (immediate -2147483648))
+; CHECK-NEXT: (set_local @0 (immediate -2147483648))
; CHECK-NEXT: (return @0)
define i32 @min_i32() {
ret i32 -2147483648
; CHECK-LABEL: (func $zero_i64
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (immediate 0))
+; CHECK-NEXT: (set_local @0 (immediate 0))
; CHECK-NEXT: (return @0)
define i64 @zero_i64() {
ret i64 0
; CHECK-LABEL: (func $one_i64
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (immediate 1))
+; CHECK-NEXT: (set_local @0 (immediate 1))
; CHECK-NEXT: (return @0)
define i64 @one_i64() {
ret i64 1
; CHECK-LABEL: (func $max_i64
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (immediate 9223372036854775807))
+; CHECK-NEXT: (set_local @0 (immediate 9223372036854775807))
; CHECK-NEXT: (return @0)
define i64 @max_i64() {
ret i64 9223372036854775807
; CHECK-LABEL: (func $min_i64
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (immediate -9223372036854775808))
+; CHECK-NEXT: (set_local @0 (immediate -9223372036854775808))
; CHECK-NEXT: (return @0)
define i64 @min_i64() {
ret i64 -9223372036854775808
; CHECK-LABEL: (func $negzero_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate -0x0p0))
+; CHECK-NEXT: (set_local @0 (immediate -0x0p0))
; CHECK-NEXT: (return @0)
define float @negzero_f32() {
ret float -0.0
; CHECK-LABEL: (func $zero_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate 0x0p0))
+; CHECK-NEXT: (set_local @0 (immediate 0x0p0))
; CHECK-NEXT: (return @0)
define float @zero_f32() {
ret float 0.0
; CHECK-LABEL: (func $one_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate 0x1p0))
+; CHECK-NEXT: (set_local @0 (immediate 0x1p0))
; CHECK-NEXT: (return @0)
define float @one_f32() {
ret float 1.0
; CHECK-LABEL: (func $two_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate 0x1p1))
+; CHECK-NEXT: (set_local @0 (immediate 0x1p1))
; CHECK-NEXT: (return @0)
define float @two_f32() {
ret float 2.0
; CHECK-LABEL: (func $nan_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate nan))
+; CHECK-NEXT: (set_local @0 (immediate nan))
; CHECK-NEXT: (return @0)
define float @nan_f32() {
ret float 0x7FF8000000000000
; CHECK-LABEL: (func $negnan_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate -nan))
+; CHECK-NEXT: (set_local @0 (immediate -nan))
; CHECK-NEXT: (return @0)
define float @negnan_f32() {
ret float 0xFFF8000000000000
; CHECK-LABEL: (func $inf_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate infinity))
+; CHECK-NEXT: (set_local @0 (immediate infinity))
; CHECK-NEXT: (return @0)
define float @inf_f32() {
ret float 0x7FF0000000000000
; CHECK-LABEL: (func $neginf_f32
; CHECK-NEXT: (result f32)
-; CHECK-NEXT: (setlocal @0 (immediate -infinity))
+; CHECK-NEXT: (set_local @0 (immediate -infinity))
; CHECK-NEXT: (return @0)
define float @neginf_f32() {
ret float 0xFFF0000000000000
; CHECK-LABEL: (func $negzero_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate -0x0p0))
+; CHECK-NEXT: (set_local @0 (immediate -0x0p0))
; CHECK-NEXT: (return @0)
define double @negzero_f64() {
ret double -0.0
; CHECK-LABEL: (func $zero_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate 0x0p0))
+; CHECK-NEXT: (set_local @0 (immediate 0x0p0))
; CHECK-NEXT: (return @0)
define double @zero_f64() {
ret double 0.0
; CHECK-LABEL: (func $one_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate 0x1p0))
+; CHECK-NEXT: (set_local @0 (immediate 0x1p0))
; CHECK-NEXT: (return @0)
define double @one_f64() {
ret double 1.0
; CHECK-LABEL: (func $two_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate 0x1p1))
+; CHECK-NEXT: (set_local @0 (immediate 0x1p1))
; CHECK-NEXT: (return @0)
define double @two_f64() {
ret double 2.0
; CHECK-LABEL: (func $nan_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate nan))
+; CHECK-NEXT: (set_local @0 (immediate nan))
; CHECK-NEXT: (return @0)
define double @nan_f64() {
ret double 0x7FF8000000000000
; CHECK-LABEL: (func $negnan_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate -nan))
+; CHECK-NEXT: (set_local @0 (immediate -nan))
; CHECK-NEXT: (return @0)
define double @negnan_f64() {
ret double 0xFFF8000000000000
; CHECK-LABEL: (func $inf_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate infinity))
+; CHECK-NEXT: (set_local @0 (immediate infinity))
; CHECK-NEXT: (return @0)
define double @inf_f64() {
ret double 0x7FF0000000000000
; CHECK-LABEL: (func $neginf_f64
; CHECK-NEXT: (result f64)
-; CHECK-NEXT: (setlocal @0 (immediate -infinity))
+; CHECK-NEXT: (set_local @0 (immediate -infinity))
; CHECK-NEXT: (return @0)
define double @neginf_f64() {
ret double 0xFFF0000000000000
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: (func $sext_i8_i32
-; CHECK: (setlocal @1 (load_s_i8_i32 @0))
+; CHECK: (set_local @1 (load_s_i8_i32 @0))
define i32 @sext_i8_i32(i8 *%p) {
%v = load i8, i8* %p
%e = sext i8 %v to i32
}
; CHECK-LABEL: (func $zext_i8_i32
-; CHECK: (setlocal @1 (load_u_i8_i32 @0))
+; CHECK: (set_local @1 (load_u_i8_i32 @0))
define i32 @zext_i8_i32(i8 *%p) {
%v = load i8, i8* %p
%e = zext i8 %v to i32
}
; CHECK-LABEL: (func $sext_i16_i32
-; CHECK: (setlocal @1 (load_s_i16_i32 @0))
+; CHECK: (set_local @1 (load_s_i16_i32 @0))
define i32 @sext_i16_i32(i16 *%p) {
%v = load i16, i16* %p
%e = sext i16 %v to i32
}
; CHECK-LABEL: (func $zext_i16_i32
-; CHECK: (setlocal @1 (load_u_i16_i32 @0))
+; CHECK: (set_local @1 (load_u_i16_i32 @0))
define i32 @zext_i16_i32(i16 *%p) {
%v = load i16, i16* %p
%e = zext i16 %v to i32
}
; CHECK-LABEL: (func $sext_i8_i64
-; CHECK: (setlocal @1 (load_s_i8_i64 @0))
+; CHECK: (set_local @1 (load_s_i8_i64 @0))
define i64 @sext_i8_i64(i8 *%p) {
%v = load i8, i8* %p
%e = sext i8 %v to i64
}
; CHECK-LABEL: (func $zext_i8_i64
-; CHECK: (setlocal @1 (load_u_i8_i64 @0))
+; CHECK: (set_local @1 (load_u_i8_i64 @0))
define i64 @zext_i8_i64(i8 *%p) {
%v = load i8, i8* %p
%e = zext i8 %v to i64
}
; CHECK-LABEL: (func $sext_i16_i64
-; CHECK: (setlocal @1 (load_s_i16_i64 @0))
+; CHECK: (set_local @1 (load_s_i16_i64 @0))
define i64 @sext_i16_i64(i16 *%p) {
%v = load i16, i16* %p
%e = sext i16 %v to i64
}
; CHECK-LABEL: (func $zext_i16_i64
-; CHECK: (setlocal @1 (load_u_i16_i64 @0))
+; CHECK: (set_local @1 (load_u_i16_i64 @0))
define i64 @zext_i16_i64(i16 *%p) {
%v = load i16, i16* %p
%e = zext i16 %v to i64
}
; CHECK-LABEL: (func $sext_i32_i64
-; CHECK: (setlocal @1 (load_s_i32_i64 @0))
+; CHECK: (set_local @1 (load_s_i32_i64 @0))
define i64 @sext_i32_i64(i32 *%p) {
%v = load i32, i32* %p
%e = sext i32 %v to i64
}
; CHECK-LABEL: (func $zext_i32_i64
-; CHECK: (setlocal @1 (load_u_i32_i64 @0))
+; CHECK: (set_local @1 (load_u_i32_i64 @0))
define i64 @zext_i32_i64(i32 *%p) {
%v = load i32, i32* %p
%e = zext i32 %v to i64
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: (func $load_u_i1_i32
-; CHECK: (setlocal @1 (load_u_i8_i32 @0))
+; CHECK: (set_local @1 (load_u_i8_i32 @0))
; CHECK-NEXT: (return @1)
define i32 @load_u_i1_i32(i1* %p) {
%v = load i1, i1* %p
}
; CHECK-LABEL: (func $load_s_i1_i32
-; CHECK: (setlocal @1 (load_u_i8_i32 @0))
-; CHECK-NEXT: (setlocal @2 (immediate 31))
-; CHECK-NEXT: (setlocal @3 (shl @1 @2))
-; CHECK-NEXT: (setlocal @4 (shr_s @3 @2))
+; CHECK: (set_local @1 (load_u_i8_i32 @0))
+; CHECK-NEXT: (set_local @2 (immediate 31))
+; CHECK-NEXT: (set_local @3 (shl @1 @2))
+; CHECK-NEXT: (set_local @4 (shr_s @3 @2))
; CHECK-NEXT: (return @4)
define i32 @load_s_i1_i32(i1* %p) {
%v = load i1, i1* %p
}
; CHECK-LABEL: (func $load_u_i1_i64
-; CHECK: (setlocal @1 (load_u_i8_i64 @0))
+; CHECK: (set_local @1 (load_u_i8_i64 @0))
; CHECK-NEXT: (return @1)
define i64 @load_u_i1_i64(i1* %p) {
%v = load i1, i1* %p
}
; CHECK-LABEL: (func $load_s_i1_i64
-; CHECK: (setlocal @1 (load_u_i8_i64 @0))
-; CHECK-NEXT: (setlocal @2 (immediate 63))
-; CHECK-NEXT: (setlocal @3 (shl @1 @2))
-; CHECK-NEXT: (setlocal @4 (shr_s @3 @2))
+; CHECK: (set_local @1 (load_u_i8_i64 @0))
+; CHECK-NEXT: (set_local @2 (immediate 63))
+; CHECK-NEXT: (set_local @3 (shl @1 @2))
+; CHECK-NEXT: (set_local @4 (shr_s @3 @2))
; CHECK-NEXT: (return @4)
define i64 @load_s_i1_i64(i1* %p) {
%v = load i1, i1* %p
}
; CHECK-LABEL: (func $store_i32_i1
-; CHECK: (setlocal @2 (immediate 1))
-; CHECK-NEXT: (setlocal @3 (and @1 @2))
+; CHECK: (set_local @2 (immediate 1))
+; CHECK-NEXT: (set_local @3 (and @1 @2))
; CHECK-NEXT: (store_i8 @0 @3)
define void @store_i32_i1(i1* %p, i32 %v) {
%t = trunc i32 %v to i1
}
; CHECK-LABEL: (func $store_i64_i1
-; CHECK: (setlocal @2 (immediate 1))
-; CHECK-NEXT: (setlocal @3 (and @1 @2))
+; CHECK: (set_local @2 (immediate 1))
+; CHECK-NEXT: (set_local @3 (and @1 @2))
; CHECK-NEXT: (store_i8 @0 @3)
define void @store_i64_i1(i1* %p, i64 %v) {
%t = trunc i64 %v to i1
; CHECK-LABEL: (func $ldi32
; CHECK-NEXT: (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (load_i32 @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (load_i32 @0))
; CHECK-NEXT: (return @1)
define i32 @ldi32(i32 *%p) {
%v = load i32, i32* %p
; CHECK-LABEL: (func $ldi64
; CHECK-NEXT: (param i32) (result i64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (load_i64 @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (load_i64 @0))
; CHECK-NEXT: (return @1)
define i64 @ldi64(i64 *%p) {
%v = load i64, i64* %p
; CHECK-LABEL: (func $ldf32
; CHECK-NEXT: (param i32) (result f32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (load_f32 @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (load_f32 @0))
; CHECK-NEXT: (return @1)
define float @ldf32(float *%p) {
%v = load float, float* %p
; CHECK-LABEL: (func $ldf64
; CHECK-NEXT: (param i32) (result f64)
-; CHECK-NEXT: (setlocal @0 (argument 0))
-; CHECK-NEXT: (setlocal @1 (load_f64 @0))
+; CHECK-NEXT: (set_local @0 (argument 0))
+; CHECK-NEXT: (set_local @1 (load_f64 @0))
; CHECK-NEXT: (return @1)
define double @ldf64(double *%p) {
%v = load double, double* %p
; CHECK-LABEL: (func $page_size
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (page_size))
+; CHECK-NEXT: (set_local @0 (page_size))
; CHECK-NEXT: (return @0)
define i32 @page_size() {
%a = call i32 @llvm.wasm.page.size.i32()
; CHECK-LABEL: (func $memory_size
; CHECK-NEXT: (result i32)
-; CHECK-NEXT: (setlocal @0 (memory_size))
+; CHECK-NEXT: (set_local @0 (memory_size))
; CHECK-NEXT: (return @0)
define i32 @memory_size() {
%a = call i32 @llvm.wasm.memory.size.i32()
; CHECK-LABEL: (func $page_size
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (page_size))
+; CHECK-NEXT: (set_local @0 (page_size))
; CHECK-NEXT: (return @0)
define i64 @page_size() {
%a = call i64 @llvm.wasm.page.size.i64()
; CHECK-LABEL: (func $memory_size
; CHECK-NEXT: (result i64)
-; CHECK-NEXT: (setlocal @0 (memory_size))
+; CHECK-NEXT: (set_local @0 (memory_size))
; CHECK-NEXT: (return @0)
define i64 @memory_size() {
%a = call i64 @llvm.wasm.memory.size.i64()
; Basic phi triangle.
; CHECK-LABEL: test0
-; CHECK: (setlocal [[REG:@.*]] (argument 0))
-; CHECK: (setlocal [[REG]] (sdiv [[REG]] {{.*}}))
+; CHECK: (set_local [[REG:@.*]] (argument 0))
+; CHECK: (set_local [[REG]] (sdiv [[REG]] {{.*}}))
; CHECK: (return [[REG]])
define i32 @test0(i32 %p) {
entry:
; CHECK-LABEL: test1
; CHECK: BB1_1:
-; CHECK: (setlocal [[REG0:@.*]] [[REG1:@.*]])
-; CHECK: (setlocal [[REG1]] [[REG2:@.*]])
-; CHECK: (setlocal [[REG2]] [[REG0]])
+; CHECK: (set_local [[REG0:@.*]] [[REG1:@.*]])
+; CHECK: (set_local [[REG1]] [[REG2:@.*]])
+; CHECK: (set_local [[REG2]] [[REG0]])
define i32 @test1(i32 %n) {
entry:
br label %loop
; CHECK-LABEL: (func $sti32
; CHECK-NEXT: (param i32) (param i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
; CHECK-NEXT: (store_i32 @1 @0)
; CHECK-NEXT: (return)
define void @sti32(i32 *%p, i32 %v) {
; CHECK-LABEL: (func $sti64
; CHECK-NEXT: (param i32) (param i64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
; CHECK-NEXT: (store_i64 @1 @0)
; CHECK-NEXT: (return)
define void @sti64(i64 *%p, i64 %v) {
; CHECK-LABEL: (func $stf32
; CHECK-NEXT: (param i32) (param f32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
; CHECK-NEXT: (store_f32 @1 @0)
; CHECK-NEXT: (return)
define void @stf32(float *%p, float %v) {
; CHECK-LABEL: (func $stf64
; CHECK-NEXT: (param i32) (param f64)
-; CHECK-NEXT: (setlocal @0 (argument 1))
-; CHECK-NEXT: (setlocal @1 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 1))
+; CHECK-NEXT: (set_local @1 (argument 0))
; CHECK-NEXT: (store_f64 @1 @0)
; CHECK-NEXT: (return)
define void @stf64(double *%p, double %v) {
; CHECK-LABEL: (func $unused_first
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 1))
+; CHECK-NEXT: (set_local @0 (argument 1))
; CHECK-NEXT: (return @0)
define i32 @unused_first(i32 %x, i32 %y) {
ret i32 %y
; CHECK-LABEL: (func $unused_second
; CHECK-NEXT: (param i32) (param i32) (result i32)
-; CHECK-NEXT: (setlocal @0 (argument 0))
+; CHECK-NEXT: (set_local @0 (argument 0))
; CHECK-NEXT: (return @0)
define i32 @unused_second(i32 %x, i32 %y) {
ret i32 %x