diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-08-24 16:39:37 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-08-24 16:39:37 +0000 |
commit | 08fc966d3c25cd943d1b07b50fa54ff390e8ee29 (patch) | |
tree | a60a072cabc120ae1d271a7faab149c20f677a93 /llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td | |
parent | 27785dd5300825e60d5ff7edf5a2bada85004b58 (diff) | |
download | bcm5719-llvm-08fc966d3c25cd943d1b07b50fa54ff390e8ee29.tar.gz bcm5719-llvm-08fc966d3c25cd943d1b07b50fa54ff390e8ee29.zip |
[WebAssembly] Implement the is_zero_undef forms of cttz and ctlz
llvm-svn: 245851
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td index cf2c6a38d51..16ed7acbb9d 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td @@ -40,3 +40,9 @@ defm UGE : ComparisonInt<SETUGE>; defm CLZ : UnaryInt<ctlz>; defm CTZ : UnaryInt<cttz>; defm POPCNT : UnaryInt<ctpop>; + +// Expand the "don't care" operations to supported operations. +def : Pat<(ctlz_zero_undef Int32:$src), (CLZ_I32 Int32:$src)>; +def : Pat<(ctlz_zero_undef Int64:$src), (CLZ_I64 Int64:$src)>; +def : Pat<(cttz_zero_undef Int32:$src), (CTZ_I32 Int32:$src)>; +def : Pat<(cttz_zero_undef Int64:$src), (CTZ_I64 Int64:$src)>; |