[InstCombine] X / (X * Y) --> 1.0 / Y
authorSanjay Patel <spatel@rotateright.com>
Mon, 12 Feb 2018 19:39:21 +0000 (19:39 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 12 Feb 2018 19:39:21 +0000 (19:39 +0000)
commit4a4f35f32411abb73360247e53d59e1fea1ca7c8
tree94cff55bc16e12f81486d7a9cca0e4315fcf2c13
parentee4257f676b81681c38cbb1ef7f3fed0ad6af4ce
[InstCombine] X / (X * Y) --> 1.0 / Y

This is similar to the instsimplify fold added with D42385
( rL323716 )
...but this can't be in instsimplify because we're creating/morphing
a different instruction.

llvm-svn: 324927
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/fdiv.ll