[InstCombine] C / -X --> -C / X
authorSanjay Patel <spatel@rotateright.com>
Wed, 21 Feb 2018 00:01:45 +0000 (00:01 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 21 Feb 2018 00:01:45 +0000 (00:01 +0000)
commit6f716a7c5e9c910bf3e098b27b10229c78412455
tree59eeaffcd58439ff24ddadc4095472ed7525f6af
parentd8dd0151fc12fbbb3f15f71174452c81001a902c
[InstCombine] C / -X --> -C / X

We already do this in DAGCombiner, but it should
also be good to eliminate the fsub use in IR.

This is similar to rL325648.

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