diff options
author | Tim Northover <tnorthover@apple.com> | 2016-08-19 20:09:07 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-08-19 20:09:07 +0000 |
commit | 5a28c3642fec0d76a81089dcf5b57412145a7f83 (patch) | |
tree | cf525988f68c561220be30c406dac8ddf5c657d4 /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | |
parent | b604622bbaa7dae77e60db7afe75a6cef55ea5c4 (diff) | |
download | bcm5719-llvm-5a28c3642fec0d76a81089dcf5b57412145a7f83.tar.gz bcm5719-llvm-5a28c3642fec0d76a81089dcf5b57412145a7f83.zip |
GlobalISel: support translating select instructions.
llvm-svn: 279309
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp index bd66a28bdc2..0d2fae659e8 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp @@ -216,3 +216,13 @@ MachineInstrBuilder MachineIRBuilder::buildICmp(ArrayRef<LLT> Tys, .addUse(Op0) .addUse(Op1); } + +MachineInstrBuilder MachineIRBuilder::buildSelect(LLT Ty, unsigned Res, + unsigned Tst, + unsigned Op0, unsigned Op1) { + return buildInstr(TargetOpcode::G_SELECT, {Ty, LLT::scalar(1)}) + .addDef(Res) + .addUse(Tst) + .addUse(Op0) + .addUse(Op1); +} |