add if and operation

Signed-off-by: Lindell Xu <lxu@vetronicsltd.com.cn>