[WebAssembly] Rename floating-point operators to match their spec names.
authorDan Gohman <dan433584@gmail.com>
Fri, 9 Oct 2015 17:50:00 +0000 (17:50 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 9 Oct 2015 17:50:00 +0000 (17:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249859 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyInstrFloat.td
test/CodeGen/WebAssembly/f32.ll
test/CodeGen/WebAssembly/f64.ll

index 570bf50cceae77e2f9ad24d363f22e57d970676d..456b2f69eb1ac37272ad38e7da8d887a69ca2491 100644 (file)
 ///
 //===----------------------------------------------------------------------===//
 
-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>;
index 48009f5eb6ceeb37cdd98380aac0ee9dc8c320b2..ad52cd25981e733b6cae4e6c910d875765ea1f96 100644 (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
index ecbd12779fab6b7ac294ad8b02774c4ab6c31e9a..3590e45fd85f21d62b4be1389c1f694a73930fdf 100644 (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