some performance fix. it works, but have no idea why. checkpoint
This commit is contained in:
10
ctx.cpp
10
ctx.cpp
@@ -1451,6 +1451,15 @@ FunctionEmitContext::Extract(llvm::Value *vector, llvm::Value *lane)
|
||||
|
||||
llvm::Value *
|
||||
FunctionEmitContext::MasksAllEqual(llvm::Value *v1, llvm::Value *v2) {
|
||||
if (g->target->getISA() == Target::NVPTX)
|
||||
{
|
||||
// Compare the two masks to get a vector of i1s
|
||||
llvm::Value *cmp = CmpInst(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_EQ,
|
||||
v1, v2, "v1==v2");
|
||||
return ExtractInst(cmp, 0); /* this works without calling All(..) in PTX. Why ?!? */
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
// Compare the two masks to get a vector of i1s
|
||||
llvm::Value *cmp = CmpInst(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_EQ,
|
||||
@@ -1465,6 +1474,7 @@ FunctionEmitContext::MasksAllEqual(llvm::Value *v1, llvm::Value *v2) {
|
||||
return CmpInst(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_EQ, mm1, mm2,
|
||||
LLVMGetName("equal", v1, v2));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
llvm::Value *
|
||||
|
||||
Reference in New Issue
Block a user