summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2018-10-13 07:26:10 +0000
committerThomas Lively <tlively@google.com>2018-10-13 07:26:10 +0000
commit3afc346dd093fad4a5a24e35204040d0be5a5b17 (patch)
tree159703e81f2bc59e3e2b74a6f38f7aeed4630d40 /llvm/lib/Target
parent16c349d892d4e2870c8bf73f943e37310a0d45ff (diff)
downloadbcm5719-llvm-3afc346dd093fad4a5a24e35204040d0be5a5b17.tar.gz
bcm5719-llvm-3afc346dd093fad4a5a24e35204040d0be5a5b17.zip
[WebAssembly] SIMD min and max
Summary: Depends on D52324 and D52764. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52325 llvm-svn: 344438
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
index 1eb38588c81..af5c03599cd 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
@@ -699,21 +699,21 @@ defm "" : SIMDAbs<v2f64, "f64x2", 128>;
// Floating-point min and max
//===----------------------------------------------------------------------===//
+multiclass SIMDBinaryFP<SDNode node, string name, bits<32> baseInst> {
+ defm "" : SIMDBinary<v4f32, "f32x4", node, name, baseInst>;
+ defm "" : SIMDBinary<v2f64, "f64x2", node, name, !add(baseInst, 1)>;
+}
+
// NaN-propagating minimum: min
-// TODO
+defm MIN : SIMDBinaryFP<fminnan, "min", 129>;
// NaN-propagating maximum: max
-// TODO
+defm MAX : SIMDBinaryFP<fmaxnan, "max", 131>;
//===----------------------------------------------------------------------===//
// Floating-point arithmetic
//===----------------------------------------------------------------------===//
-multiclass SIMDBinaryFP<SDNode node, string name, bits<32> baseInst> {
- defm "" : SIMDBinary<v4f32, "f32x4", node, name, baseInst>;
- defm "" : SIMDBinary<v2f64, "f64x2", node, name, !add(baseInst, 1)>;
-}
-
// Addition: add
let isCommutable = 1 in
defm ADD : SIMDBinaryFP<fadd, "add", 133>;
OpenPOWER on IntegriCloud