[PATCH] D65226: [Strict FP] Allow custom operation actions

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 10:23:12 PDT 2019


uweigand created this revision.
uweigand added reviewers: andrew.w.kaylor, cameron.mcinally, kpn, hfinkel, craig.topper.
Herald added subscribers: llvm-commits, jsji, MaskRay, nemanjai.
Herald added a project: LLVM.

This patch changes the DAG legalizer to respect the operation actions set by the target for strict floating-point operations.  (Currently, the legalizer will usually fall back to mutate to the non-strict action (which is assumed to be legal), and only skip mutation if the strict operation is marked legal.)

With this patch, if whenever a strict operation is marked as Legal or Custom, it is passed to the target as usual.  Only if it is marked as Expand will the legalizer attempt to mutate to the non-strict operation.  Note that this will now fail if the non-strict operation is itself marked as Custom -- the target will have to provide a Custom definition for the strict operation then as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D65226

Files:
  include/llvm/CodeGen/TargetLowering.h
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  test/CodeGen/PowerPC/vector-constrained-fp-intrinsics.ll
  test/CodeGen/X86/vector-constrained-fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65226.211537.patch
Type: text/x-patch
Size: 50685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190724/24cb7b02/attachment.bin>


More information about the llvm-commits mailing list