Max Kazantsev
34ae308c73
[SCEV] Use context to strengthen flags of BinOps
...
Sometimes SCEV cannot infer nuw/nsw from something as simple as
```
len in [0, MAX_INT]
...
iv = phi(0, iv.next)
guard(iv <s len)
guard(iv <u len)
iv.next = iv + 1
```
just because flag strenthening only relies on definition and does not use local facts.
This patch adds support for the simplest case: inference of flags of `add(x, constant)`
if we can contextually prove that `x <= max_int - constant`.
In case if it has negative CT impact, we can add an option to switch it off. I woudln't
expect that though.
Differential Revision: https://reviews.llvm.org/D129643
Reviewed By: apilipenko
2022-08-03 14:08:57 +07:00
..
2022-08-03 14:08:57 +07:00
2022-05-21 15:48:14 +02:00
2022-08-03 14:08:57 +07:00
2021-03-19 11:29:48 +07:00
2021-06-21 16:24:16 -07:00
2022-04-23 14:08:47 +01:00
2020-12-15 14:50:32 +07:00
2020-10-08 11:15:35 +07:00
2022-06-01 10:46:06 +02:00
2022-08-03 14:08:57 +07:00
2020-09-08 11:15:40 +07:00
2021-03-19 12:28:22 +07:00
2022-08-03 14:08:57 +07:00
2021-08-30 12:06:58 +03:00
2021-11-16 12:41:04 +00:00
2020-04-03 20:15:04 +03:00
2021-10-20 20:48:33 +01:00
2022-07-13 10:27:04 +02:00
2022-08-03 14:08:57 +07:00
2022-07-13 10:27:04 +02:00
2021-05-07 19:52:29 +01:00
2020-09-29 13:20:59 +02:00
2021-08-27 10:27:16 -07:00
2020-12-17 01:03:49 +03:00
2022-05-18 09:53:07 +02:00
2022-08-03 14:08:57 +07:00
2022-07-13 10:27:04 +02:00
2022-07-17 10:48:35 +08:00
2021-03-06 21:52:46 +03:00
2020-10-14 17:03:33 +07:00
2020-11-20 20:08:43 -05:00
2021-10-20 20:48:33 +01:00
2020-03-05 16:27:59 -05:00
2022-07-14 11:46:48 +02:00
2022-06-01 10:46:06 +02:00
2020-10-14 17:03:33 +07:00
2021-03-06 21:52:46 +03:00
2022-04-04 13:04:27 +02:00
2020-10-14 17:03:33 +07:00
2022-06-01 10:46:06 +02:00
2021-11-23 09:58:46 -08:00
2020-11-20 14:00:46 -05:00
2020-12-20 00:18:33 +03:00
2021-09-04 16:45:51 -07:00
2022-08-03 14:08:57 +07:00
2020-04-03 20:15:04 +03:00
2020-10-28 18:51:40 +07:00
2021-09-21 11:17:56 +07:00
2022-07-13 10:27:04 +02:00
2022-02-17 08:48:11 -08:00
2021-10-15 11:49:18 +07:00
2022-04-22 10:44:29 +01:00
2022-05-21 15:48:14 +02:00
2020-09-08 11:15:40 +07:00
2022-07-13 10:27:04 +02:00
2022-06-01 10:46:06 +02:00
2020-04-03 20:15:04 +03:00
2020-07-28 09:09:13 -07:00
2020-04-03 20:15:04 +03:00
2022-07-13 10:27:04 +02:00
2022-05-11 12:20:53 +02:00
2022-07-14 14:41:51 +02:00
2022-03-18 12:04:35 +01:00
2022-06-08 16:01:29 +07:00
2022-06-09 10:12:13 +02:00
2022-07-05 15:31:23 +02:00
2020-11-26 12:37:21 +07:00
2021-11-29 15:23:34 -08:00
2021-03-06 21:52:46 +03:00
2020-11-26 14:28:21 +01:00
2022-07-13 10:27:04 +02:00
2022-07-13 10:27:04 +02:00
2020-11-19 15:37:54 +08:00
2022-01-25 13:25:19 +07:00
2021-09-04 16:45:51 -07:00
2021-07-11 17:04:50 -07:00
2021-02-25 15:54:18 +00:00
2021-10-14 13:04:22 -07:00
2020-12-17 01:03:49 +03:00
2020-09-17 22:37:43 +07:00
2022-08-03 14:08:57 +07:00
2021-03-13 16:05:34 +03:00
2020-11-02 22:31:11 +01:00