Skip to content

Commit dc03a37

Browse files
committed
Commit changes for rebase
1 parent d6537de commit dc03a37

File tree

2 files changed

+7
-30
lines changed

2 files changed

+7
-30
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3580,7 +3580,11 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
35803580
S, OpPC, Call, [](const APSInt &F, const APSInt &T, const APSInt &C) {
35813581
return ((APInt)C).isNegative() ? T : F;
35823582
});
3583-
// case X86::BI__builtin_ia32_ptestz128:
3583+
3584+
case X86::BI__builtin_ia32_ptestz128: {
3585+
3586+
}
3587+
35843588
// case X86::BI__builtin_ia32_ptestz256:
35853589

35863590
// case X86::BI__builtin_ia32_ptestc128:

clang/lib/AST/ExprConstant.cpp

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12047,36 +12047,9 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
1204712047
bool ResultSigned = ResultType->isUnsignedIntegerOrEnumerationType();
1204812048
APSInt Result(APInt(BitWidth, Flag), ResultSigned);
1204912049
return Success(APValue(Result), E);
12050+
}
1205012051

12051-
// auto *DestTy = E->getType()->castAs<VectorType>();
12052-
// QualType DestEltTy = DestTy->getElementType();
12053-
// bool DestUnsigned = DestEltTy->isUnsignedIntegerOrEnumerationType();
12054-
// const unsigned SourceLen = SourceLHS.getVectorLength();
12055-
// SmallVector<APValue, 4> ResultElements;
12056-
// ResultElements.reserve(SourceLen);
12057-
12058-
// unsigned BitWidth = SourceLHS.getVectorElt(0).getInt().getBitWidth();
12059-
12060-
// auto PopulateResultElements = [&](bool Flag) {
12061-
// for (unsigned I = 0; I < SourceLen - 1; ++I) {
12062-
// ResultElements.emplace_back(APSInt(APInt::getZero(BitWidth), DestUnsigned));
12063-
// }
12064-
// ResultElements.emplace_back(APSInt(APInt(BitWidth, Flag), DestUnsigned));
12065-
// };
12066-
12067-
// for (unsigned EltNum = 0; EltNum < SourceLen; ++EltNum) {
12068-
// const APInt &A = SourceLHS.getVectorElt(EltNum).getInt();
12069-
// const APInt &B = SourceRHS.getVectorElt(EltNum).getInt();
12070-
// if ((A & B) != 0) {
12071-
// PopulateResultElements(false);
12072-
// return Success(APValue(ResultElements.data(), SourceLen), E);
12073-
// }
12074-
// }
12075-
// PopulateResultElements(true);
12076-
// return Success(APValue(ResultElements.data(), SourceLen), E);
12077-
}
12078-
12079-
// case clang::X86::BI__builtin_ia32_ptestz256:
12052+
// case X86::BI__builtin_ia32_ptestz256:
1208012053

1208112054
// case X86::BI__builtin_ia32_ptestc128:
1208212055
// case X86::BI__builtin_ia32_ptestc256:

0 commit comments

Comments
 (0)