diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2010-12-07 23:53:37 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2010-12-07 23:53:37 +0000 |
| commit | 0584316dfbf3207915568fd920c86aa4cd58e3fa (patch) | |
| tree | 133291c71a673418599afb5657ec37df4c6f76a4 /utils/TableGen/NeonEmitter.cpp | |
| parent | da1d3dc9a5ebc2b7d1c7340b22a872f4dddc7dc6 (diff) | |
Add operators for vmlal{_n,_lane} and vmlsl{_n,_lane}
so they can be implemented without clang builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/NeonEmitter.cpp')
| -rw-r--r-- | utils/TableGen/NeonEmitter.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 935f7afcdc..c7b3ec55a6 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -603,8 +603,7 @@ static std::string GenOpString(OpKind op, const std::string &proto, break; case OpMullLane: s += Extend(proto, typestr, "__a") + " * " + - Extend(proto, typestr, - SplatLane(nElts, "__b", "__c")) + ";"; + Extend(proto, typestr, SplatLane(nElts, "__b", "__c")) + ";"; break; case OpMull: s += Extend(proto, typestr, "__a") + " * " + @@ -619,6 +618,18 @@ static std::string GenOpString(OpKind op, const std::string &proto, case OpMla: s += "__a + (__b * __c);"; break; + case OpMlalN: + s += "__a + (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, Duplicate(nElts, typestr, "__c")) + ");"; + break; + case OpMlalLane: + s += "__a + (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, SplatLane(nElts, "__c", "__d")) + ");"; + break; + case OpMlal: + s += "__a + (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, "__c") + ");"; + break; case OpMlsN: s += "__a - (__b * " + Duplicate(nElts, typestr, "__c") + ");"; break; @@ -628,6 +639,18 @@ static std::string GenOpString(OpKind op, const std::string &proto, case OpMls: s += "__a - (__b * __c);"; break; + case OpMlslN: + s += "__a - (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, Duplicate(nElts, typestr, "__c")) + ");"; + break; + case OpMlslLane: + s += "__a - (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, SplatLane(nElts, "__c", "__d")) + ");"; + break; + case OpMlsl: + s += "__a - (" + Extend(proto, typestr, "__b") + " * " + + Extend(proto, typestr, "__c") + ");"; + break; case OpEq: s += "(" + ts + ")(__a == __b);"; break; |
