Commit 7579db11 by Ben Clayton

LLVMReactor: Fix the signature of a few instrinsics

The 2nd boolean parameter is not part of the name (for example llvm.ctlz.i8). Caught by the IR verifier which gets automatically run with coroutines. Bug: b/131914569 Bug: b/126873455 Change-Id: I1ce325c9bf64587f5c9c0a1a0129b80ef19e07f1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30449Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent dde010f2
......@@ -3444,10 +3444,7 @@ namespace rr
RValue<Float4> Pow(RValue<Float4> x, RValue<Float4> y)
{
::llvm::SmallVector<::llvm::Type*, 2> paramTys;
paramTys.push_back(T(Float4::getType()));
paramTys.push_back(T(Float4::getType()));
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::pow, paramTys);
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::pow, { T(Float4::getType()) });
return RValue<Float4>(V(::builder->CreateCall2(func, ARGS(V(x.value), V(y.value)))));
}
......@@ -3477,10 +3474,7 @@ namespace rr
RValue<UInt4> Ctlz(RValue<UInt4> v, bool isZeroUndef)
{
::llvm::SmallVector<::llvm::Type*, 2> paramTys;
paramTys.push_back(T(UInt4::getType()));
paramTys.push_back(T(Bool::getType()));
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::ctlz, paramTys);
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::ctlz, { T(UInt4::getType()) } );
return RValue<UInt4>(V(::builder->CreateCall2(func, ARGS(
V(v.value),
isZeroUndef ? ::llvm::ConstantInt::getTrue(*::context) : ::llvm::ConstantInt::getFalse(*::context)
......@@ -3489,10 +3483,7 @@ namespace rr
RValue<UInt4> Cttz(RValue<UInt4> v, bool isZeroUndef)
{
::llvm::SmallVector<::llvm::Type*, 2> paramTys;
paramTys.push_back(T(UInt4::getType()));
paramTys.push_back(T(Bool::getType()));
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::cttz, paramTys);
auto func = llvm::Intrinsic::getDeclaration(::module, llvm::Intrinsic::cttz, { T(UInt4::getType()) } );
return RValue<UInt4>(V(::builder->CreateCall2(func, ARGS(
V(v.value),
isZeroUndef ? ::llvm::ConstantInt::getTrue(*::context) : ::llvm::ConstantInt::getFalse(*::context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment