[all-commits] [llvm/llvm-project] 0ade2a: [InstCombine] fneg(X + C) --> -C - X

RotateRight via All-commits all-commits at lists.llvm.org
Wed Jan 22 06:49:41 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ade2abdb01f4a16b1f08d1a78d664b9e9d5f3b5
      https://github.com/llvm/llvm-project/commit/0ade2abdb01f4a16b1f08d1a78d664b9e9d5f3b5
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-01-22 (Wed, 22 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/fneg.ll

  Log Message:
  -----------
  [InstCombine] fneg(X + C) --> -C - X

This is 1 of the potential folds uncovered by extending D72521.

We don't seem to do this in the backend either (unless I'm not
seeing some target-specific transform).

icc and gcc (appears to be target-specific) do this transform.

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




More information about the All-commits mailing list