Fix bug in lEmitVaryingSelect() for targets with i1 mask types.
Commit 53414f12e6 introduced a but where lEmitVaryingSelect() would
try to truncate a vector of i1s to a vector of i1s, which in turn
made LLVM's IR analyzer unhappy.
This commit is contained in:
1
expr.cpp
1
expr.cpp
@@ -3124,6 +3124,7 @@ lEmitVaryingSelect(FunctionEmitContext *ctx, llvm::Value *test,
|
||||
llvm::Value *expr1, llvm::Value *expr2,
|
||||
const Type *type) {
|
||||
#if !defined(LLVM_3_1)
|
||||
if (test->getType() != LLVMTypes::Int1VectorType)
|
||||
test = ctx->TruncInst(test, LLVMTypes::Int1VectorType);
|
||||
return ctx->SelectInst(test, expr1, expr2, "select");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user