Skip to content
  • Armin Rigo's avatar
    Generate more compact code for bit tests using the TEST instruction: · 092643ba66ac
    Armin Rigo authored
         i1 = int_and(i0, 7); i2 = int_is_zero(i1); guard_true(i2)
    
         =>
    
         i2 = int_test_is_zero(i0, 7); guard_true(i2)
    
    The more compact version doesn't need to allocate a register, copy
    a value there, AND a constant, and then CMP the result with zero.
    Instead a single TEST instruction suffices.
    
    --HG--
    branch : int-test-is-zero
    092643ba66ac