[Constants] extend getBinOpIdentity(); NFC

The enhanced version will be used in D48893 and related patches
and an almost identical (fadd is different) version is proposed 
in D28907, so adding this as a preliminary step.


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