[PATCH] D57484: [GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 09:10:54 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353057: [GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR (authored by paquette, committed by ).
Herald added a subscriber: kristina.
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D57484?vs=184398&id=185065#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57484/new/
https://reviews.llvm.org/D57484
Files:
llvm/trunk/include/llvm/Support/TargetOpcodes.def
llvm/trunk/include/llvm/Target/GenericOpcodes.td
llvm/trunk/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
Index: llvm/trunk/include/llvm/Target/GenericOpcodes.td
===================================================================
--- llvm/trunk/include/llvm/Target/GenericOpcodes.td
+++ llvm/trunk/include/llvm/Target/GenericOpcodes.td
@@ -579,6 +579,13 @@
let hasSideEffects = 0;
}
+// Floating point floor of a value.
+def G_FFLOOR : GenericInstruction {
+ let OutOperandList = (outs type0:$dst);
+ let InOperandList = (ins type0:$src1);
+ let hasSideEffects = 0;
+}
+
//------------------------------------------------------------------------------
// Opcodes for LLVM Intrinsics
//------------------------------------------------------------------------------
Index: llvm/trunk/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
===================================================================
--- llvm/trunk/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
+++ llvm/trunk/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
@@ -93,6 +93,7 @@
def : GINodeEquiv<G_FSIN, fsin>;
def : GINodeEquiv<G_FABS, fabs>;
def : GINodeEquiv<G_FSQRT, fsqrt>;
+def : GINodeEquiv<G_FFLOOR, ffloor>;
// Broadly speaking G_LOAD is equivalent to ISD::LOAD but there are some
// complications that tablegen must take care of. For example, Predicates such
Index: llvm/trunk/include/llvm/Support/TargetOpcodes.def
===================================================================
--- llvm/trunk/include/llvm/Support/TargetOpcodes.def
+++ llvm/trunk/include/llvm/Support/TargetOpcodes.def
@@ -529,6 +529,9 @@
/// Floating point square root.
HANDLE_TARGET_OPCODE(G_FSQRT)
+/// Floating point floor.
+HANDLE_TARGET_OPCODE(G_FFLOOR)
+
/// Generic AddressSpaceCast.
HANDLE_TARGET_OPCODE(G_ADDRSPACE_CAST)
Index: llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
@@ -340,7 +340,10 @@
# DEBUG: .. the first uncovered type index: 1, OK
#
# DEBUG-NEXT: G_FSQRT (opcode {{[0-9]+}}): 1 type index
-# DEBUG: .. the first uncovered type index: 1, OK
+# DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
+#
+# DEBUG-NEXT: G_FFLOOR (opcode {{[0-9]+}}): 1 type index
+# DEBUG: .. type index coverage check SKIPPED: no rules defined
# CHECK-NOT: ill-defined
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57484.185065.patch
Type: text/x-patch
Size: 2435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190204/b72aa9e8/attachment.bin>
More information about the llvm-commits
mailing list