Sanjoy Das
e8fd9561cb
[SCEV] Fix incorrect trip count computation
...
The way we elide max expressions when computing trip counts is incorrect
-- it breaks cases like this:
```
static int wrapping_add(int a, int b) {
return (int)((unsigned)a + (unsigned)b);
}
void test() {
volatile int end_buf = 2147483548; // INT_MIN - 100
int end = end_buf;
unsigned counter = 0;
for (int start = wrapping_add(end, 200); start < end; start++)
counter++;
print(counter);
}
```
Note: the `NoWrap` variable that was being tested has little to do with
the values flowing into the max expression; it is a property of the
induction variable.
test/Transforms/LoopUnroll/nsw-tripcount.ll was added to solely test
functionality I'm reverting in this change, so I've deleted the test
fully.
llvm-svn: 273079
2016-06-18 04:38:31 +00:00
..
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2010-01-26 19:25:59 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-09-09 20:47:30 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-11-19 05:56:52 +00:00
2015-10-07 18:14:25 +00:00
2013-08-22 00:51:19 +00:00
2016-05-11 17:41:41 +00:00
2015-03-26 17:28:26 +00:00
2016-06-08 17:48:36 +00:00
2016-05-29 00:31:18 +00:00
2015-03-20 02:25:00 +00:00
2016-05-10 00:31:49 +00:00
2015-02-09 18:34:55 +00:00
2016-03-09 01:51:44 +00:00
2016-05-29 00:32:17 +00:00
2015-03-18 00:41:29 +00:00
2015-04-01 18:24:06 +00:00
2015-02-27 21:17:42 +00:00
2015-03-09 21:43:39 +00:00
2015-03-09 21:43:39 +00:00
2015-04-16 23:24:18 +00:00
2015-10-22 19:57:19 +00:00
2015-10-22 19:57:38 +00:00
2016-05-17 17:51:14 +00:00
2015-10-30 15:02:28 +00:00
2016-05-29 00:32:17 +00:00
2016-05-25 13:01:33 +00:00
2016-05-25 13:01:33 +00:00
2016-06-18 04:38:31 +00:00
2016-05-29 00:34:42 +00:00
2010-01-26 19:25:59 +00:00
2015-03-13 18:20:45 +00:00
2015-02-24 01:02:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:31:19 +00:00
2015-09-10 05:27:38 +00:00
2015-11-02 02:06:01 +00:00
2016-05-29 00:32:17 +00:00
2016-04-08 14:29:09 +00:00
2015-03-09 21:43:43 +00:00
2016-02-20 04:01:45 +00:00
2016-02-09 00:07:08 +00:00
2016-05-03 17:49:57 +00:00
2016-02-04 01:27:38 +00:00
2015-02-25 20:02:59 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-03-09 21:43:39 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2016-03-03 18:31:23 +00:00
2015-10-28 21:27:14 +00:00
2015-02-27 21:17:42 +00:00
2015-10-31 23:21:40 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-11-19 05:56:52 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-09 21:43:39 +00:00
2015-02-27 21:17:42 +00:00
2016-06-18 04:38:31 +00:00
2016-06-09 01:13:59 +00:00
2010-04-12 07:49:36 +00:00
2015-04-16 23:24:18 +00:00
2015-09-25 23:53:50 +00:00