summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-08-19 22:40:08 +0000
committerTim Northover <tnorthover@apple.com>2016-08-19 22:40:08 +0000
commita11be047696cf71bb76517d1c1d63fefa123b49b (patch)
tree51fc04c07192b0f3cd9dc23e1a201917b47c808b /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
parentea904f9424cc37c5ff7ac595e465ede2a10fdf0d (diff)
downloadbcm5719-llvm-a11be047696cf71bb76517d1c1d63fefa123b49b.tar.gz
bcm5719-llvm-a11be047696cf71bb76517d1c1d63fefa123b49b.zip
GlobalISel: support legalization of G_FCONSTANTs
llvm-svn: 279341
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index aa64be5a4c3..5ad75889723 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -211,6 +211,11 @@ MachineInstrBuilder MachineIRBuilder::buildTrunc(LLT Ty, unsigned Res,
return buildInstr(TargetOpcode::G_TRUNC, Ty).addDef(Res).addUse(Op);
}
+MachineInstrBuilder MachineIRBuilder::buildFPTrunc(LLT Ty, unsigned Res,
+ unsigned Op) {
+ return buildInstr(TargetOpcode::G_FPTRUNC, Ty).addDef(Res).addUse(Op);
+}
+
MachineInstrBuilder MachineIRBuilder::buildICmp(ArrayRef<LLT> Tys,
CmpInst::Predicate Pred,
unsigned Res, unsigned Op0,
OpenPOWER on IntegriCloud