diff options
| author | Simon Tatham <simon.tatham@arm.com> | 2019-06-21 11:14:51 +0000 |
|---|---|---|
| committer | Simon Tatham <simon.tatham@arm.com> | 2019-06-21 11:14:51 +0000 |
| commit | 7d76f8acf00b30d2f8414aa1241e4fec18628f1f (patch) | |
| tree | 33236650cb2d7f31a975717bb740cbaf1c8a71ac /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
| parent | c26b8f2afcec9d5d4a1a08f1d5bf6e3598b65077 (diff) | |
| download | bcm5719-llvm-7d76f8acf00b30d2f8414aa1241e4fec18628f1f.tar.gz bcm5719-llvm-7d76f8acf00b30d2f8414aa1241e4fec18628f1f.zip | |
[ARM] Add MVE vector compare instructions.
Summary:
These take a pair of vector register to compare, and a comparison type
(written in the form of an Arm condition suffix); they output a vector
of booleans in the VPR register, where predication can conveniently
use them.
Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62676
llvm-svn: 364027
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 217766669a3..28c0f4cbc2b 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -6568,6 +6568,7 @@ bool ARMAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, // scalar predication operand we do not add the vector one and leave until // now to fix it up. if (CanAcceptVPTPredicationCode && Mnemonic != "vmov" && + !Mnemonic.startswith("vcmp") && !(Mnemonic.startswith("vcvt") && Mnemonic != "vcvta" && Mnemonic != "vcvtn" && Mnemonic != "vcvtp" && Mnemonic != "vcvtm")) { SMLoc Loc = SMLoc::getFromPointer(NameLoc.getPointer() + Mnemonic.size() + @@ -6683,12 +6684,12 @@ bool ARMAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, Operands.insert(Operands.begin(), ARMOperand::CreateToken(StringRef("vcvtn"), MLoc)); } - // For vmov instructions, as mentioned earlier, we did not add the vector + // For vmov and vcmp, as mentioned earlier, we did not add the vector // predication code, since these may contain operands that require // special parsing. So now we have to see if they require vector // predication and replace the scalar one with the vector predication // operand if that is the case. - else if (Mnemonic == "vmov" || + else if (Mnemonic == "vmov" || Mnemonic.startswith("vcmp") || (Mnemonic.startswith("vcvt") && !Mnemonic.startswith("vcvta") && !Mnemonic.startswith("vcvtn") && !Mnemonic.startswith("vcvtp") && !Mnemonic.startswith("vcvtm"))) { |

