diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-07-21 17:26:50 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-07-21 17:26:50 +0000 |
commit | 2b59eab79fa05d3d8cd45a1e450253e6d7d183fd (patch) | |
tree | a43e7609294c8b0039f3531c30d64e2141796495 /llvm/lib/CodeGen/GlobalISel | |
parent | a4bcc3f069861f85365bb9076629940cff8d018f (diff) | |
download | bcm5719-llvm-2b59eab79fa05d3d8cd45a1e450253e6d7d183fd.tar.gz bcm5719-llvm-2b59eab79fa05d3d8cd45a1e450253e6d7d183fd.zip |
[IRTranslator] Add G_SUB opcode.
This commit adds a generic SUB opcode to global-isel.
llvm-svn: 276308
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 145f2e2f384..e017b498f56 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -105,6 +105,8 @@ bool IRTranslator::translate(const Instruction &Inst) { // Arithmetic operations. case Instruction::Add: return translateBinaryOp(TargetOpcode::G_ADD, Inst); + case Instruction::Sub: + return translateBinaryOp(TargetOpcode::G_SUB, Inst); // Bitwise operations. case Instruction::And: return translateBinaryOp(TargetOpcode::G_AND, Inst); |