[llvm-commits] [dragonegg] r146509 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Tue Dec 13 12:19:09 PST 2011
Author: baldrick
Date: Tue Dec 13 14:19:08 2011
New Revision: 146509
URL: http://llvm.org/viewvc/llvm-project?rev=146509&view=rev
Log:
Fix up a call to the cttz intrinsic: it now takes an extra parameter.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=146509&r1=146508&r2=146509&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Dec 13 14:19:08 2011
@@ -3920,9 +3920,11 @@
// The argument and return type of cttz should match the argument type of
// the ffs, but should ignore the return type of ffs.
Value *Amt = EmitMemory(gimple_call_arg(stmt, 0));
- EmitBuiltinUnaryOp(Amt, Result, Intrinsic::cttz);
- Result = Builder.CreateAdd(Result,
- ConstantInt::get(Result->getType(), 1));
+ Result = Builder.CreateCall2(Intrinsic::getDeclaration(TheModule,
+ Intrinsic::cttz,
+ Amt->getType()),
+ Amt, Builder.getTrue());
+ Result = Builder.CreateAdd(Result, ConstantInt::get(Result->getType(), 1));
Result = Builder.CreateIntCast(Result,
ConvertType(gimple_call_return_type(stmt)),
/*isSigned*/false);
More information about the llvm-commits
mailing list