]> granicus.if.org Git - llvm/commit
[InstCombine] fold fadd+fneg with fdiv/fmul betweena
authorSanjay Patel <spatel@rotateright.com>
Mon, 29 Jul 2019 13:50:25 +0000 (13:50 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 29 Jul 2019 13:50:25 +0000 (13:50 +0000)
commitd76b11b54b8d2025dd2b1604f191d75da41cd3eb
tree5c82abe012d698f3caf6b75305abcfee84ddabf9
parentda3da38c85c00f93b98d7e03d2fa8d588e9377a7
[InstCombine] fold fadd+fneg with fdiv/fmul betweena

The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367227 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/fadd.ll