Refactored and simplified eq/neq for llvm