[llvm] r249859 - [WebAssembly] Rename floating-point operators to match their spec names.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 10:50:01 PDT 2015
Author: djg
Date: Fri Oct 9 12:50:00 2015
New Revision: 249859
URL: http://llvm.org/viewvc/llvm-project?rev=249859&view=rev
Log:
[WebAssembly] Rename floating-point operators to match their spec names.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
llvm/trunk/test/CodeGen/WebAssembly/f32.ll
llvm/trunk/test/CodeGen/WebAssembly/f64.ll
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFloat.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFloat.td?rev=249859&r1=249858&r2=249859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFloat.td (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFloat.td Fri Oct 9 12:50:00 2015
@@ -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>;
Modified: llvm/trunk/test/CodeGen/WebAssembly/f32.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/f32.ll?rev=249859&r1=249858&r2=249859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/f32.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/f32.ll Fri Oct 9 12:50:00 2015
@@ -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
Modified: llvm/trunk/test/CodeGen/WebAssembly/f64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/f64.ll?rev=249859&r1=249858&r2=249859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/f64.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/f64.ll Fri Oct 9 12:50:00 2015
@@ -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
}
; 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
}
; 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
}
; 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
}
; 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
More information about the llvm-commits
mailing list