[all-commits] [llvm/llvm-project] 0ec098: [FPEnv] Allow fneg + strict_fadd -> strict_fsub in...

Andrew Wock via All-commits all-commits at lists.llvm.org
Thu Aug 27 05:17:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ec098e22ba9c882ea2a9885d5d5f5dc4e4073ed
      https://github.com/llvm/llvm-project/commit/0ec098e22ba9c882ea2a9885d5d5f5dc4e4073ed
  Author: Drew Wock <drew.wock at sas.com>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AMDGPU/strict_fadd.f32.ll
    A llvm/test/CodeGen/X86/strict-fadd-combines.ll

  Log Message:
  -----------
  [FPEnv] Allow fneg + strict_fadd -> strict_fsub in DAGCombiner

This is the first of a set of DAGCombiner changes enabling strictfp
optimizations. I want to test to waters with this to make sure changes
like these are acceptable for the strictfp case- this particular change
should preserve exception ordering and result precision perfectly, and
many other possible changes appear to be able to as well.

Copied from regular fadd combines but modified to preserve ordering via
the chain, this change allows strict_fadd x, (fneg y) to become
struct_fsub x, y and strict_fadd (fneg x), y to become strict_fsub y, x.

Differential Revision: https://reviews.llvm.org/D85548




More information about the All-commits mailing list