Nikita Popov
ed3f06b9b3
[IR] Add zext nneg flag ( #67982 )
...
Add an nneg flag to the zext instruction, which specifies that the
argument is non-negative. Otherwise, the result is a poison value.
The primary use-case for the flag is to preserve information when sext
gets replaced with zext due to range-based canonicalization. The nneg
flag allows us to convert the zext back into an sext later. This is
useful for some optimizations (e.g. a signed icmp can fold with sext but
not zext), as well as some targets (e.g. RISCV prefers sext over zext).
Discourse thread: https://discourse.llvm.org/t/rfc-add-zext-nneg-flag/73914
This patch is based on https://reviews.llvm.org/D156444 by
@Panagiotis156, with some implementation simplifications and additional
tests.
---------
Co-authored-by: Panagiotis K <karouzakispan@gmail.com>
2023-10-30 09:04:04 +01:00
..
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-19 14:10:05 +09:00
2023-05-17 17:03:15 +02:00
2023-09-14 21:26:11 +09:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-20 18:36:42 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-01-13 01:18:56 +03:00
2022-12-14 15:14:12 +01:00
2023-06-30 21:24:05 +02:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-01-03 12:38:25 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2023-06-28 14:31:48 +02:00
2022-10-25 12:15:39 -04:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2023-10-28 17:10:20 +08:00
2023-01-03 14:52:48 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-11-23 08:49:44 -05:00
2023-02-16 17:58:33 -08:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2023-04-28 10:03:32 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-09 17:44:32 +07:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2023-01-13 01:18:56 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-20 18:36:42 +03:00
2022-12-05 21:12:20 +03:00
2023-01-04 16:27:49 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2023-06-30 21:24:05 +02:00
2022-12-14 15:14:12 +01:00
2023-09-22 18:29:59 +08:00
2023-09-22 18:29:59 +08:00
2022-09-05 15:13:46 +01:00
2023-09-22 18:29:59 +08:00
2022-12-14 15:14:12 +01:00
2022-12-20 18:36:42 +03:00
2022-12-14 15:14:12 +01:00
2023-08-17 09:59:07 +01:00
2023-09-22 18:29:59 +08:00
2023-10-30 09:04:04 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-01-13 01:18:56 +03:00
2023-01-13 01:18:56 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2023-01-13 01:18:56 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-19 00:24:28 +03:00
2022-12-05 21:12:20 +03:00
2023-03-24 14:31:40 +01:00
2023-04-27 13:04:17 -07:00
2023-04-27 13:04:17 -07:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2023-10-28 17:10:20 +08:00
2023-10-28 17:10:20 +08:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2023-07-12 14:35:55 +02:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-06-28 12:09:27 +02:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-06-16 13:53:31 -07:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2023-08-21 12:05:32 +02:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-05-19 14:10:05 +09:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2023-01-04 16:27:49 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-07-25 06:46:19 -07:00
2022-12-14 15:14:12 +01:00
2022-12-08 02:38:51 +03:00
2022-12-14 15:14:12 +01:00
2023-07-12 14:35:55 +02:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2023-10-26 20:39:24 +08:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2023-07-31 13:44:52 -07:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2023-10-28 17:10:20 +08:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2022-12-08 11:47:16 +01:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-14 15:14:12 +01:00
2022-12-05 21:12:20 +03:00
2022-12-05 21:12:20 +03:00
2023-07-31 13:44:52 -07:00
2022-12-05 21:12:20 +03:00
2023-01-04 16:27:49 +01:00
2022-12-14 15:14:12 +01:00
2023-01-13 21:04:17 +03:00