[llvm-commits] [llvm-gcc-4.2] r40747 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Devang Patel
dpatel at apple.com
Thu Aug 2 11:02:47 PDT 2007
Author: dpatel
Date: Thu Aug 2 13:02:46 2007
New Revision: 40747
URL: http://llvm.org/viewvc/llvm-project?rev=40747&view=rev
Log:
Expand builtin_parityl().
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=40747&r1=40746&r2=40747&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Aug 2 13:02:46 2007
@@ -4320,12 +4320,12 @@
EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::cttz);
return true;
}
+ case BUILT_IN_PARITYL:
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");
+ ConstantInt::get(Result->getType(), 1), "tmp");
return true;
}
case BUILT_IN_POPCOUNT: // These GCC builtins always return int.
More information about the llvm-commits
mailing list