[PATCH] D85548: Allow fneg + strict_fadd -> strict_fsub in DAGCombiner

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 09:12:39 PDT 2020


spatel added a comment.

In D85548#2223912 <https://reviews.llvm.org/D85548#2223912>, @arsenm wrote:

> In D85548#2223906 <https://reviews.llvm.org/D85548#2223906>, @spatel wrote:
>
>> Why wait until codegen to do this? IIUC, it's impossible for any backend to spontaneously create strict FP ops, so this pattern must be present in the original IR.
>> Ie, wouldn't we be better off reducing these in IR (InstCombinerImpl::visitCallInst())?
>
> It doesn't matter if instcombine does this or not, this pattern could still easily appear after legalization

Ok, I haven't followed strict FP closely, so my assumption was wrong. Is there a test or example somewhere that shows how a strict fadd is created out of something else?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85548/new/

https://reviews.llvm.org/D85548



More information about the llvm-commits mailing list