Revert change to lEmitVaryingSelect().
Using vector select versus a store and masked load for varying vector selects seems to give worse code. This may be related to http://llvm.org/bugs/show_bug.cgi?id=16941.
This commit is contained in:
5
expr.cpp
5
expr.cpp
@@ -3123,7 +3123,10 @@ static llvm::Value *
|
||||
lEmitVaryingSelect(FunctionEmitContext *ctx, llvm::Value *test,
|
||||
llvm::Value *expr1, llvm::Value *expr2,
|
||||
const Type *type) {
|
||||
#if !defined(LLVM_3_1)
|
||||
#if 0 // !defined(LLVM_3_1)
|
||||
// Though it should be equivalent, this seems to cause non-trivial
|
||||
// performance regressions versus the below. This may be related to
|
||||
// http://llvm.org/bugs/show_bug.cgi?id=16941.
|
||||
if (test->getType() != LLVMTypes::Int1VectorType)
|
||||
test = ctx->TruncInst(test, LLVMTypes::Int1VectorType);
|
||||
return ctx->SelectInst(test, expr1, expr2, "select");
|
||||
|
||||
Reference in New Issue
Block a user