[WebAssembly] Rename floating-point operators to match their spec names.

llvm-svn: 249859
This commit is contained in:
Dan Gohman 2015-10-09 17:50:00 +00:00
parent 694f6d1578
commit 5da6833905
3 changed files with 18 additions and 18 deletions

View File

@ -12,14 +12,14 @@
///
//===----------------------------------------------------------------------===//
defm FADD : BinaryFP<fadd>;
defm FSUB : BinaryFP<fsub>;
defm FMUL : BinaryFP<fmul>;
defm FDIV : BinaryFP<fdiv>;
defm ADD : BinaryFP<fadd>;
defm SUB : BinaryFP<fsub>;
defm MUL : BinaryFP<fmul>;
defm DIV : BinaryFP<fdiv>;
defm SQRT : UnaryFP<fsqrt>;
defm FABS : UnaryFP<fabs>;
defm FNEG : UnaryFP<fneg>;
defm ABS : UnaryFP<fabs>;
defm NEG : UnaryFP<fneg>;
defm COPYSIGN : BinaryFP<fcopysign>;
defm CEIL : UnaryFP<fceil>;

View File

@ -22,7 +22,7 @@ declare float @llvm.rint.f32(float)
; CHECK-NEXT: set_local @2, pop{{$}}
; CHECK-NEXT: @0{{$}}
; CHECK-NEXT: set_local @3, pop{{$}}
; CHECK-NEXT: fadd @3, @2{{$}}
; CHECK-NEXT: add @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
; CHECK-NEXT: return @4{{$}}
define float @fadd32(float %x, float %y) {
@ -31,7 +31,7 @@ define float @fadd32(float %x, float %y) {
}
; CHECK-LABEL: fsub32:
; CHECK: fsub @3, @2{{$}}
; CHECK: sub @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define float @fsub32(float %x, float %y) {
%a = fsub float %x, %y
@ -39,7 +39,7 @@ define float @fsub32(float %x, float %y) {
}
; CHECK-LABEL: fmul32:
; CHECK: fmul @3, @2{{$}}
; CHECK: mul @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define float @fmul32(float %x, float %y) {
%a = fmul float %x, %y
@ -47,7 +47,7 @@ define float @fmul32(float %x, float %y) {
}
; CHECK-LABEL: fdiv32:
; CHECK: fdiv @3, @2{{$}}
; CHECK: div @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define float @fdiv32(float %x, float %y) {
%a = fdiv float %x, %y
@ -55,7 +55,7 @@ define float @fdiv32(float %x, float %y) {
}
; CHECK-LABEL: fabs32:
; CHECK: fabs @1{{$}}
; CHECK: abs @1{{$}}
; CHECK-NEXT: set_local @2, pop{{$}}
define float @fabs32(float %x) {
%a = call float @llvm.fabs.f32(float %x)
@ -63,7 +63,7 @@ define float @fabs32(float %x) {
}
; CHECK-LABEL: fneg32:
; CHECK: fneg @1{{$}}
; CHECK: neg @1{{$}}
; CHECK-NEXT: set_local @2, pop{{$}}
define float @fneg32(float %x) {
%a = fsub float -0., %x

View File

@ -22,7 +22,7 @@ declare double @llvm.rint.f64(double)
; CHECK-NEXT: set_local @2, pop{{$}}
; CHECK-NEXT: @0{{$}}
; CHECK-NEXT: set_local @3, pop{{$}}
; CHECK-NEXT: fadd @3, @2{{$}}
; CHECK-NEXT: add @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
; CHECK-NEXT: return @4{{$}}
define double @fadd64(double %x, double %y) {
@ -31,7 +31,7 @@ define double @fadd64(double %x, double %y) {
}
; CHECK-LABEL: fsub64:
; CHECK: fsub @3, @2{{$}}
; CHECK: sub @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define double @fsub64(double %x, double %y) {
%a = fsub double %x, %y
@ -39,7 +39,7 @@ define double @fsub64(double %x, double %y) {
}
; CHECK-LABEL: fmul64:
; CHECK: fmul @3, @2{{$}}
; CHECK: mul @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define double @fmul64(double %x, double %y) {
%a = fmul double %x, %y
@ -47,7 +47,7 @@ define double @fmul64(double %x, double %y) {
}
; CHECK-LABEL: fdiv64:
; CHECK: fdiv @3, @2{{$}}
; CHECK: div @3, @2{{$}}
; CHECK-NEXT: set_local @4, pop{{$}}
define double @fdiv64(double %x, double %y) {
%a = fdiv double %x, %y
@ -55,7 +55,7 @@ define double @fdiv64(double %x, double %y) {
}
; CHECK-LABEL: fabs64:
; CHECK: fabs @1{{$}}
; CHECK: abs @1{{$}}
; CHECK-NEXT: set_local @2, pop{{$}}
define double @fabs64(double %x) {
%a = call double @llvm.fabs.f64(double %x)
@ -63,7 +63,7 @@ define double @fabs64(double %x) {
}
; CHECK-LABEL: fneg64:
; CHECK: fneg @1{{$}}
; CHECK: neg @1{{$}}
; CHECK-NEXT: set_local @2, pop{{$}}
define double @fneg64(double %x) {
%a = fsub double -0., %x