Skip to content

Commit 8089053

Browse files
committed
removed rotate as it was removed in PR #161924
1 parent 08f30d2 commit 8089053

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -712,30 +712,6 @@ static bool interp__builtin_expect(InterpState &S, CodePtr OpPC,
712712
return true;
713713
}
714714

715-
/// rotateleft(value, amount)
716-
static bool interp__builtin_rotate(InterpState &S, CodePtr OpPC,
717-
const InterpFrame *Frame,
718-
const CallExpr *Call, bool Right) {
719-
PrimType AmountT = *S.getContext().classify(Call->getArg(1)->getType());
720-
PrimType ValueT = *S.getContext().classify(Call->getArg(0)->getType());
721-
722-
uint64_t N = Value.countr_zero();
723-
pushInteger(S, N == Value.getBitWidth() ? 0 : N + 1, Call->getType());
724-
APSInt Amount = popToAPSInt(S.Stk, AmountT);
725-
APSInt Value = popToAPSInt(S.Stk, ValueT);
726-
727-
APSInt Result;
728-
if (Right)
729-
Result = APSInt(Value.rotr(Amount.urem(Value.getBitWidth())),
730-
/*IsUnsigned=*/true);
731-
else // Left.
732-
Result = APSInt(Value.rotl(Amount.urem(Value.getBitWidth())),
733-
/*IsUnsigned=*/true);
734-
735-
pushInteger(S, Result, Call->getType());
736-
return true;
737-
}
738-
739715
static bool interp__builtin_addressof(InterpState &S, CodePtr OpPC,
740716
const InterpFrame *Frame,
741717
const CallExpr *Call) {

0 commit comments

Comments
 (0)