diff options
author | Tim Northover <tnorthover@apple.com> | 2016-07-29 17:58:00 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-07-29 17:58:00 +0000 |
commit | 69c2ba546f6bbe089e5fa0680966f501f3b1ef5f (patch) | |
tree | 98e4ec29152655fe48a522de8a26f51450b4982e /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | |
parent | 01e41f11a726e52e095e82f6bc0f2a17a70fd99d (diff) | |
download | bcm5719-llvm-69c2ba546f6bbe089e5fa0680966f501f3b1ef5f.tar.gz bcm5719-llvm-69c2ba546f6bbe089e5fa0680966f501f3b1ef5f.zip |
GlobalISel: add generic conditional branch.
Just the basic equivalent to DAG's condbr for now, we'll get to things like
br_cc when we start doing more legalization.
llvm-svn: 277184
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp index 5d611240098..426de444d88 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp @@ -95,7 +95,13 @@ MachineInstrBuilder MachineIRBuilder::buildCopy(unsigned Res, unsigned Op) { return buildInstr(TargetOpcode::COPY).addDef(Res).addUse(Op); } -MachineInstrBuilder MachineIRBuilder::buildLoad(LLT VTy, LLT PTy, unsigned Res, +MachineInstrBuilder MachineIRBuilder::buildBrCond(LLT Ty, unsigned Tst, + MachineBasicBlock &Dest) { + return buildInstr(TargetOpcode::G_BRCOND, Ty).addUse(Tst).addMBB(&Dest); +} + + + MachineInstrBuilder MachineIRBuilder::buildLoad(LLT VTy, LLT PTy, unsigned Res, unsigned Addr, MachineMemOperand &MMO) { return buildInstr(TargetOpcode::G_LOAD, {VTy, PTy}) |