[PATCH] D46967: Vector constrained FP intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 11:27:29 PDT 2018


cameron.mcinally created this revision.
cameron.mcinally added reviewers: ab, kpn, hfinkel, andrew.w.kaylor, mehdi_amini, uweigand.
Herald added a subscriber: llvm-commits.

Let me preface this by noting that I'm not yet comfortable with constrained FP intrinsics implementation, so I'm posting this patch to initiate a conversation on how I should proceed...

I wrote some tests to exercise the vector variants of the constrained FP intrinsics and found that some of the vector lib calls may need special handling. E.g. vector POW on X86 is expanded. This will require special handling of STRICT_FPOW in VectorLegalizer::LegalizeOp(...).

To handle STRICT_FPOW, I followed the existing code in SelectionDAGLegalize::LegalizeOp(...), since I believe this is in line with the intended implementation for the STRICT_XXX opcodes.

That being said, it may be more maintainable to reuse a helper function that converts a STRICT_XXX into its corresponding XXX node early in the LegailizeOp(...) functions. For example,

  if (Node->isStrictFPOpcode())
    Node = DAG.mutateStrictFPToFP(Node);

Thoughts?


Repository:
  rL LLVM

https://reviews.llvm.org/D46967

Files:
  lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  test/CodeGen/X86/vector-constrained-fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46967.147115.patch
Type: text/x-patch
Size: 9555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/1bde04a4/attachment.bin>


More information about the llvm-commits mailing list