[llvm-commits] CVS: llvm/test/Integer/a1.ll a1.ll.out a15.ll a15.ll.out a17.ll a17.ll.out a31.ll a31.ll.out a33.ll a33.ll.out a63.ll.out a7.ll.out a9.ll.out
Duncan Sands
baldrick at free.fr
Sat Mar 24 15:10:09 PDT 2007
> Fix incorrect test cases for srem. The definition of srem is a remainder so
> that the sign of the result follows the sign of the divisor.
In "A rem B", I hope you mean A when you talk of the divisor! Because
A rem B has the sign of A (unless B exactly divides A, in which case the
sign is zero). There is what is also called "mod" which differs in that
A mod B has the sign of B. In gcc, mod is called FLOOR_MOD_EXPR and
rem is called TRUNC_MOD_EXPR. When I implemented FLOOR_MOD_EXPR in
turns of rem, I checked that LLVM's rem operator behaves as I describe
above.
Ciao,
Duncan.
More information about the llvm-commits
mailing list