summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-11-23 20:33:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-11-23 20:33:57 +0000
commitc21a821e9f044004bc504dd7bfdfaecb9d4af16b (patch)
treee01a80c5fdfbe1e0a146ff48666d071091f90c62 /lib/Target/README.txt
parentb6133d148312a3ec15beb67c2f49a21e5082b666 (diff)
downloadllvm-c21a821e9f044004bc504dd7bfdfaecb9d4af16b.tar.gz
llvm-c21a821e9f044004bc504dd7bfdfaecb9d4af16b.tar.bz2
llvm-c21a821e9f044004bc504dd7bfdfaecb9d4af16b.tar.xz
The srem -> urem transform is not safe for any divisor that's not a power of two.
E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r--lib/Target/README.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index b98531ca85..38f5af642d 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -1704,8 +1704,8 @@ Missed instcombine transformation:
%384 = shl i64 %381, %383 ; [#uses=1]
%385 = icmp slt i32 %tmp14.i, 64 ; [#uses=1]
-The srem can be transformed to an and because if x is negative, the shift is
-undefined. Testcase derived from 403.gcc.
+The srem can be transformed to an and because if %tmp14.i is negative, the
+shift is undefined. Testcase derived from 403.gcc.
//===---------------------------------------------------------------------===//