Commit 0237ac84 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

ART: Special-case cb(n)z even for in-reg constant

Call out to OpCmpImmBranch in GenCompareAndBranch if the constant
is zero and we are testing == or !=, even when zero has been loaded
to a register already. This avoids a register size mismatch on 64b
architectures when basically doing a null check, and generally
squashes a cmp + branch to a cbz or cbnz on Arm and Mips. X86 is
not degraded.

Bug: 16562601

(cherry picked from commit b07c1f9f)

Change-Id: I42701e827feb848470aa991297755d808fa0a077
parent f071e86c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment