diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-11-10 21:40:21 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-11-10 21:40:21 +0000 |
commit | b84ae9bb38dd5d5472d28b2c8f2b686ef1249a85 (patch) | |
tree | 2c01cc18bb01cb86abb09512108824c3d276c199 /llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td | |
parent | 3809ca9d00eb8596d85b6ca7cdd32195c560cefb (diff) | |
download | bcm5719-llvm-b84ae9bb38dd5d5472d28b2c8f2b686ef1249a85.tar.gz bcm5719-llvm-b84ae9bb38dd5d5472d28b2c8f2b686ef1249a85.zip |
[WebAssembly] Support for floating point min and max.
llvm-svn: 252653
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td index 689aeac6291..232af03464a 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td @@ -22,6 +22,9 @@ defm ABS : UnaryFP<fabs, "abs">; defm NEG : UnaryFP<fneg, "neg">; defm COPYSIGN : BinaryFP<fcopysign, "copysign">; +defm MIN : BinaryFP<fminnan, "min">; +defm MAX : BinaryFP<fmaxnan, "max">; + defm CEIL : UnaryFP<fceil, "ceil">; defm FLOOR : UnaryFP<ffloor, "floor">; defm TRUNC : UnaryFP<ftrunc, "trunc">; @@ -52,13 +55,6 @@ def : Pat<(setle f64:$lhs, f64:$rhs), (LE_F64 f64:$lhs, f64:$rhs)>; def : Pat<(setgt f64:$lhs, f64:$rhs), (GT_F64 f64:$lhs, f64:$rhs)>; def : Pat<(setge f64:$lhs, f64:$rhs), (GE_F64 f64:$lhs, f64:$rhs)>; -/* - * TODO(jfb): Add the following for 32-bit and 64-bit. - * - * f32.min: minimum (binary operator); if either operand is NaN, returns NaN - * f32.max: maximum (binary operator); if either operand is NaN, returns NaN - */ - def SELECT_F32 : I<(outs F32:$dst), (ins I32:$cond, F32:$lhs, F32:$rhs), [(set F32:$dst, (select I32:$cond, F32:$lhs, F32:$rhs))], "f32.select $dst, $cond, $lhs, $rhs">; |