x86 compiler should handle the "div/rem by 1" case

The current implementation of the (div/rem)/imm algorithm in
ART's x86 compiler (X86Mir2Lir::GenDivRemLit) handles the only
case when imm == -1, imm >= 2 and imm <= -2, but in the case
when imm == 1, the result of calculation is incorrect.

This patch adds handler of the "div/rem by 1" case.

Change-Id: I4bcdcd9c17f5ccb6c60e7c359c00e04cd07f5bee
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
1 file changed