Eliminate X86ISD::TEST, using X86ISD::CMP instead. Match X86ISD::CMP patterns