Lines Matching defs:A

187   static bool increment(IntegralAP A, IntegralAP *R) {
188 IntegralAP<Signed> One(1, A.bitWidth());
189 return add(A, One, A.bitWidth() + 1, R);
192 static bool decrement(IntegralAP A, IntegralAP *R) {
193 IntegralAP<Signed> One(1, A.bitWidth());
194 return sub(A, One, A.bitWidth() + 1, R);
197 static bool add(IntegralAP A, IntegralAP B, unsigned OpBits, IntegralAP *R) {
198 return CheckAddSubMulUB<std::plus>(A, B, OpBits, R);
201 static bool sub(IntegralAP A, IntegralAP B, unsigned OpBits, IntegralAP *R) {
202 return CheckAddSubMulUB<std::minus>(A, B, OpBits, R);
205 static bool mul(IntegralAP A, IntegralAP B, unsigned OpBits, IntegralAP *R) {
206 return CheckAddSubMulUB<std::multiplies>(A, B, OpBits, R);
209 static bool rem(IntegralAP A, IntegralAP B, unsigned OpBits, IntegralAP *R) {
211 *R = IntegralAP(A.V.srem(B.V));
213 *R = IntegralAP(A.V.urem(B.V));
217 static bool div(IntegralAP A, IntegralAP B, unsigned OpBits, IntegralAP *R) {
219 *R = IntegralAP(A.V.sdiv(B.V));
221 *R = IntegralAP(A.V.udiv(B.V));
225 static bool bitAnd(IntegralAP A, IntegralAP B, unsigned OpBits,
227 *R = IntegralAP(A.V & B.V);
231 static bool bitOr(IntegralAP A, IntegralAP B, unsigned OpBits,
233 *R = IntegralAP(A.V | B.V);
237 static bool bitXor(IntegralAP A, IntegralAP B, unsigned OpBits,
239 *R = IntegralAP(A.V ^ B.V);
243 static bool neg(const IntegralAP &A, IntegralAP *R) {
244 APInt AI = A.V;
250 static bool comp(IntegralAP A, IntegralAP *R) {
251 *R = IntegralAP(~A.V);
255 static void shiftLeft(const IntegralAP A, const IntegralAP B, unsigned OpBits,
257 *R = IntegralAP(A.V.shl(B.V.getZExtValue()));
260 static void shiftRight(const IntegralAP A, const IntegralAP B,
264 *R = IntegralAP(A.V.ashr(ShiftAmount));
266 *R = IntegralAP(A.V.lshr(ShiftAmount));
296 static bool CheckAddSubMulUB(const IntegralAP &A, const IntegralAP &B,
299 R->V = Op<APInt>{}(A.V, B.V);
303 const APSInt &LHS = A.toAPSInt();