diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-11-23 20:33:57 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-11-23 20:33:57 +0000 |
| commit | 94a622af4c91df2ad3f471c8896b302ddb865065 (patch) | |
| tree | d7c600c75babe7cfa09ee9744bbbb6971e494081 /llvm/lib/Target | |
| parent | 966b25b938ffef56cb805006bc385670a3578941 (diff) | |
| download | bcm5719-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.txt | 4 |
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. //===---------------------------------------------------------------------===// |

