OSDN Git Service

[InstCombine] allow fmul fold with less than 'fast'
authorSanjay Patel <spatel@rotateright.com>
Fri, 2 Mar 2018 00:14:51 +0000 (00:14 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 2 Mar 2018 00:14:51 +0000 (00:14 +0000)
commit49894f8747754e6bef71381523013056e60ab1d0
tree4b081533962e4507560fab7207ba78f5e2275c12
parentd79d6661eea46bc23b6b2d66183950ee40ad3575
[InstCombine] allow fmul fold with less than 'fast'

This is a retry of r326502 with updates to the reassociate
test file that I missed the first time.

@test15_reassoc in the supposed -reassociate test file
(except that it tests 2 other passes too...) shows that
there's no clear responsiblity for reassociation transforms.

Instcombine now gets that case, but only because the
constant values are identical. Otherwise, it would still
miss that pattern.

Reassociate doesn't get that case because it hasn't been
updated to use less than 'fast' FMF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326513 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
test/Transforms/InstCombine/fmul.ll
test/Transforms/Reassociate/fast-basictest.ll