[optimizing] Improve constant folding on logical and
am: 4eb6eb40e8

Change-Id: I92ce328eb7f8250e6fc1fd87f133c9d20a8934fd