aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-08-19 20:48:16 +0000
committerTim Northover <tnorthover@apple.com>2016-08-19 20:48:16 +0000
commitd5c23bcfc9287a21280116ec1a5364f54c2df10c (patch)
tree82ba06131c63b20db973d6749e01faaacce7c57a /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
parent8075b823223ea465d8fc7d7720a8abbee5798b77 (diff)
downloadllvm-d5c23bcfc9287a21280116ec1a5364f54c2df10c.zip
llvm-d5c23bcfc9287a21280116ec1a5364f54c2df10c.tar.gz
llvm-d5c23bcfc9287a21280116ec1a5364f54c2df10c.tar.bz2
GlobalISel: translate floating-point comparisons
llvm-svn: 279319
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index 2fe6eab..aa64be5 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -222,6 +222,17 @@ MachineInstrBuilder MachineIRBuilder::buildICmp(ArrayRef<LLT> Tys,
.addUse(Op1);
}
+MachineInstrBuilder MachineIRBuilder::buildFCmp(ArrayRef<LLT> Tys,
+ CmpInst::Predicate Pred,
+ unsigned Res, unsigned Op0,
+ unsigned Op1) {
+ return buildInstr(TargetOpcode::G_FCMP, Tys)
+ .addDef(Res)
+ .addPredicate(Pred)
+ .addUse(Op0)
+ .addUse(Op1);
+}
+
MachineInstrBuilder MachineIRBuilder::buildSelect(LLT Ty, unsigned Res,
unsigned Tst,
unsigned Op0, unsigned Op1) {