diff options
author | Derek Schuff <dschuff@google.com> | 2015-11-03 22:40:40 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2015-11-03 22:40:40 +0000 |
commit | 6b5c6da7603a6ddab37d93828b20141cd410c3da (patch) | |
tree | 4962600ebdef32b29a271eccd3663cbbb5c4e63e /llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td | |
parent | 0644900004343cd0eb094eba97a3f2edf61a1cd5 (diff) | |
download | bcm5719-llvm-6b5c6da7603a6ddab37d93828b20141cd410c3da.tar.gz bcm5719-llvm-6b5c6da7603a6ddab37d93828b20141cd410c3da.zip |
[WebAssembly] Support wasm select operator
Summary:
Add support for wasm's select operator, and lower LLVM's select DAG node
to it.
Reviewers: sunfish
Subscribers: dschuff, llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D14295
llvm-svn: 252002
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td index 456b2f69eb1..7f342c353e1 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td @@ -58,3 +58,8 @@ def : Pat<(setge f64:$lhs, f64:$rhs), (GE_F64 f64:$lhs, f64:$rhs)>; * 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))]>; +def SELECT_F64 : I<(outs F64:$dst), (ins I32:$cond, F64:$lhs, F64:$rhs), + [(set F64:$dst, (select I32:$cond, F64:$lhs, F64:$rhs))]>; |