Currently, inline cost model considers a binary operator as free only if both its operands are constants. Some simple cases are missing such as a + 0, a - a, etc. This patch modifies visitBinaryOperator() to call SimplifyBinOp() without going through simplifyInstruction() to get rid of the constant restriction. Thus, visitAnd() and visitOr() are not needed.
Here is the impact on code size and performance (spec20xx)
|Benchmark||Code Size (%)||Perf (%)|
|(+ is bigger)||(+ is faster)|