1//===-- GenericOpcodes.td - Opcodes used with GlobalISel ---*- tablegen -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the generic opcodes used with GlobalISel. 11// After instruction selection, these opcodes should not appear. 12// 13//===----------------------------------------------------------------------===// 14 15//------------------------------------------------------------------------------ 16// Binary ops. 17//------------------------------------------------------------------------------ 18// Generic addition. 19def G_ADD : Instruction { 20 let OutOperandList = (outs unknown:$dst); 21 let InOperandList = (ins unknown:$src1, unknown:$src2); 22 let hasSideEffects = 0; 23 let isCommutable = 1; 24} 25 26// Generic bitwise or. 27def G_OR : Instruction { 28 let OutOperandList = (outs unknown:$dst); 29 let InOperandList = (ins unknown:$src1, unknown:$src2); 30 let hasSideEffects = 0; 31 let isCommutable = 1; 32} 33 34//------------------------------------------------------------------------------ 35// Branches. 36//------------------------------------------------------------------------------ 37// Generic unconditional branch. 38def G_BR : Instruction { 39 let OutOperandList = (outs); 40 let InOperandList = (ins unknown:$src1); 41 let hasSideEffects = 0; 42 let isBranch = 1; 43 let isTerminator = 1; 44} 45 46// TODO: Add the other generic opcodes. 47