diff options
author | Tim Northover <tnorthover@apple.com> | 2016-08-19 20:48:16 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-08-19 20:48:16 +0000 |
commit | d5c23bcfc9287a21280116ec1a5364f54c2df10c (patch) | |
tree | 82ba06131c63b20db973d6749e01faaacce7c57a /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | |
parent | 8075b823223ea465d8fc7d7720a8abbee5798b77 (diff) | |
download | llvm-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.cpp | 11 |
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) { |