[PATCH] D42806: [AArch64] optionally filter out denorms when using frsqrte to calculate sqrt

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 10:25:49 PST 2018


spatel created this revision.
spatel added reviewers: evandro, t.p.northover, scanon, dmgreen, efriedma.
Herald added subscribers: kristof.beyls, javed.absar, mcrosier, rengolin, aemerson.

This is a follow-up to https://reviews.llvm.org/D42323 where we noticed that AArch64 did not pick up the change for filtering out denorm inputs to a sqrt estimate. That's because it wasn't using the generic DAGCombiner code to mask off a 0.0 sqrt input.

Note: This patch is only for the (odd?) case where we're ok with using a sqrt estimate, but are not using flush-to-zero mode to kill denorms.

I don't have a system to test the HW behavior (should confirm that frsqrte returns INF with a denorm input?), and my reading of AArch asm isn't good, so please make sure the new code is actually correct.


https://reviews.llvm.org/D42806

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  test/CodeGen/AArch64/sqrt-fastmath.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42806.132420.patch
Type: text/x-patch
Size: 13327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180201/e502bc79/attachment.bin>


More information about the llvm-commits mailing list