forked from OSchip/llvm-project
[MachineIRBuilder] Add buildOr helper. NFC.
This isn't used anywhere yet, but I need it for a future commit. llvm-svn: 307141
This commit is contained in:
parent
55e2f5963a
commit
3e40b46bf0
|
@ -296,6 +296,19 @@ public:
|
|||
MachineInstrBuilder buildAnd(unsigned Res, unsigned Op0,
|
||||
unsigned Op1);
|
||||
|
||||
/// Build and insert \p Res<def> = G_OR \p Op0, \p Op1
|
||||
///
|
||||
/// G_OR sets \p Res to the bitwise or of integer parameters \p Op0 and \p
|
||||
/// Op1.
|
||||
///
|
||||
/// \pre setBasicBlock or setMI must have been called.
|
||||
/// \pre \p Res, \p Op0 and \p Op1 must be generic virtual registers
|
||||
/// with the same (scalar or vector) type).
|
||||
///
|
||||
/// \return a MachineInstrBuilder for the newly created instruction.
|
||||
MachineInstrBuilder buildOr(unsigned Res, unsigned Op0,
|
||||
unsigned Op1);
|
||||
|
||||
/// Build and insert \p Res<def> = G_ANYEXT \p Op0
|
||||
///
|
||||
/// G_ANYEXT produces a register of the specified width, with bits 0 to
|
||||
|
|
|
@ -240,6 +240,10 @@ MachineInstrBuilder MachineIRBuilder::buildAnd(unsigned Res, unsigned Op0,
|
|||
return buildBinaryOp(TargetOpcode::G_AND, Res, Op0, Op1);
|
||||
}
|
||||
|
||||
MachineInstrBuilder MachineIRBuilder::buildOr(unsigned Res, unsigned Op0,
|
||||
unsigned Op1) {
|
||||
return buildBinaryOp(TargetOpcode::G_OR, Res, Op0, Op1);
|
||||
}
|
||||
|
||||
MachineInstrBuilder MachineIRBuilder::buildBr(MachineBasicBlock &Dest) {
|
||||
return buildInstr(TargetOpcode::G_BR).addMBB(&Dest);
|
||||
|
|
Loading…
Reference in New Issue