On May 13, 2007, at 4:45 PM, Reid Spencer wrote: > +APInt APInt::rotl(uint32_t rotateAmt) const { > + // Don't get too fancy, just use existing shift/or facilities > + APInt hi(*this); > + APInt lo(*this); > + hi.shl(rotateAmt); > + lo.lshr(BitWidth - rotateAmt); > + return hi | lo; > +} > + > +APInt APInt::rotr(uint32_t rotateAmt) const { > + // Don't get too fancy, just use existing shift/or facilities > + APInt hi(*this); > + APInt lo(*this); > + lo.lshr(rotateAmt); > + hi.shl(BitWidth - rotateAmt); > + return hi | lo; > +}
Do these work for rotamt = 0 ? -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits