summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commit94a622af4c91df2ad3f471c8896b302ddb865065 (patch)
treed7c600c75babe7cfa09ee9744bbbb6971e494081 /llvm/lib/Target
parent966b25b938ffef56cb805006bc385670a3578941 (diff)
downloadbcm5719-llvm-94a622af4c91df2ad3f471c8896b302ddb865065.tar.gz
bcm5719-llvm-94a622af4c91df2ad3f471c8896b302ddb865065.zip
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. llvm-svn: 120049
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/README.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index b98531ca859..38f5af642d7 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/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.
//===---------------------------------------------------------------------===//
OpenPOWER on IntegriCloud