> URL: http://llvm.org/viewvc/llvm-project?rev=40742&view=rev > Log: > Expand builtin_parity.
Cool: > + case BUILT_IN_PARITY: { > + Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); > + EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::ctpop); > + Result = Builder.CreateBinOp(Instruction::And, Result, > + TreeConstantToLLVM::ConvertINTEGER_CST > (integer_one_node), > + "tmp"); I don't think that ConvertINTEGER_CST will work here: the type of the "Result" var and the "1" constant have to match. I assume that this will work for parity of int, but fail on parity of long long etc. Please use: ConstantInt::get(Result->getType(), 1) instead, -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits