Fix invariant fdiv hoisting in LICM

FDiv is replaced with multiplication by reciprocal and invariant
reciprocal is hoisted out of the loop, while multiplication remains
even if invariant.

Switch checks for all invariant operands and only invariant
denominator to fix the issue.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335411 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed