Move narrowing from TreeNodeInfoInitCmp to LowerCompare
authorMike Danes <onemihaid@hotmail.com>
Sat, 17 Dec 2016 16:28:42 +0000 (18:28 +0200)
committerMike Danes <onemihaid@hotmail.com>
Tue, 17 Jan 2017 18:25:19 +0000 (20:25 +0200)
commit734a83412b5f87c3accf55b6724c4d07041e1313
tree1a6d3505d16af5039bf0ef0a69fdca3b82557564
parent9fdd43ad023c138f39f29490c65f67002d0f14e7
Move narrowing from TreeNodeInfoInitCmp to LowerCompare

FX diff shows a 1274 bytes improvement without any regressions. The original code didn't narrow the compare when op2 was 0. Because of this we had

movzx eax, byte ptr [ebx]
test eax, eax

instead of the shorter

cmp byte ptr[ebx], 0
src/jit/lower.cpp
src/jit/lowerxarch.cpp