diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-03-21 19:54:41 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-03-21 19:54:41 +0000 |
commit | c8d7f14506afc62f69a802dd56fa95006ae2472b (patch) | |
tree | f53ae6979655778c5601e5b253c8d67c4761b913 /llvm/lib | |
parent | 2e5c526bb11b281c86564b3172729ed6aa0d6ed8 (diff) | |
download | bcm5719-llvm-c8d7f14506afc62f69a802dd56fa95006ae2472b.tar.gz bcm5719-llvm-c8d7f14506afc62f69a802dd56fa95006ae2472b.zip |
[WebAssembly] Implement the eqz instructions.
llvm-svn: 263976
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td index b23e825dbf9..f5404ec8c8a 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td @@ -54,6 +54,13 @@ defm CLZ : UnaryInt<ctlz, "clz ">; defm CTZ : UnaryInt<cttz, "ctz ">; defm POPCNT : UnaryInt<ctpop, "popcnt">; +def EQZ_I32 : I<(outs I32:$dst), (ins I32:$src), + [(set I32:$dst, (setcc I32:$src, 0, SETEQ))], + "i32.eqz \t$dst, $src">; +def EQZ_I64 : I<(outs I32:$dst), (ins I64:$src), + [(set I32:$dst, (setcc I64:$src, 0, SETEQ))], + "i64.eqz \t$dst, $src">; + } // Defs = [ARGUMENTS] // Expand the "don't care" operations to supported operations. |