10
ctx.cpp
10
ctx.cpp
@@ -553,8 +553,10 @@ FunctionEmitContext::EndIf() {
|
|||||||
breakLanes, "|break_lanes");
|
breakLanes, "|break_lanes");
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Value *notBreakOrContinue =
|
llvm::Value *notBreakOrContinue =
|
||||||
NotOperator(bcLanes, "!(break|continue)_lanes");
|
BinaryOperator(llvm::Instruction::Xor,
|
||||||
|
bcLanes, LLVMMaskAllOn,
|
||||||
|
"!(break|continue)_lanes");
|
||||||
llvm::Value *oldMask = GetInternalMask();
|
llvm::Value *oldMask = GetInternalMask();
|
||||||
llvm::Value *newMask =
|
llvm::Value *newMask =
|
||||||
BinaryOperator(llvm::Instruction::And, oldMask,
|
BinaryOperator(llvm::Instruction::And, oldMask,
|
||||||
@@ -659,7 +661,9 @@ FunctionEmitContext::restoreMaskGivenReturns(llvm::Value *oldMask) {
|
|||||||
// newMask = (oldMask & ~returnedLanes)
|
// newMask = (oldMask & ~returnedLanes)
|
||||||
llvm::Value *returnedLanes = LoadInst(returnedLanesPtr,
|
llvm::Value *returnedLanes = LoadInst(returnedLanesPtr,
|
||||||
"returned_lanes");
|
"returned_lanes");
|
||||||
llvm::Value *notReturned = NotOperator(returnedLanes, "~returned_lanes");
|
llvm::Value *notReturned = BinaryOperator(llvm::Instruction::Xor,
|
||||||
|
returnedLanes, LLVMMaskAllOn,
|
||||||
|
"~returned_lanes");
|
||||||
llvm::Value *newMask = BinaryOperator(llvm::Instruction::And,
|
llvm::Value *newMask = BinaryOperator(llvm::Instruction::And,
|
||||||
oldMask, notReturned, "new_mask");
|
oldMask, notReturned, "new_mask");
|
||||||
SetInternalMask(newMask);
|
SetInternalMask(newMask);
|
||||||
|
|||||||
3
expr.cpp
3
expr.cpp
@@ -1796,8 +1796,7 @@ lEmitLogicalOp(BinaryExpr::Op op, Expr *arg0, Expr *arg1,
|
|||||||
// For the instances where value0 was true, we need to inhibit
|
// For the instances where value0 was true, we need to inhibit
|
||||||
// execution.
|
// execution.
|
||||||
ctx->SetCurrentBasicBlock(bbEvalValue1);
|
ctx->SetCurrentBasicBlock(bbEvalValue1);
|
||||||
llvm::Value *not0 = ctx->NotOperator(value0);
|
ctx->SetInternalMaskAndNot(oldMask, value0);
|
||||||
ctx->SetInternalMaskAnd(oldMask, not0);
|
|
||||||
|
|
||||||
llvm::Value *value1 = arg1->GetValue(ctx);
|
llvm::Value *value1 = arg1->GetValue(ctx);
|
||||||
if (value1 == NULL) {
|
if (value1 == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user