DaKnig
5e1a49c5af
[SelectionDAG] Don't always use abs(sub) when expanding abdu ( #235043 )
...
`TargetLowering::expandABD` expands `abd(a, b)` to `abs(sub(a, b))` when
`willNotOverflowSub` says the sub can't overflow. For `abdu` without
known
non-negative operands, this checks for unsigned overflow, which only
proves
`a >= b (unsigned)`, so `abdu(a, b) == sub(a, b)`. adding abs around it
is wrong, when the
difference is greater than INT_MAX, e.g. `abdu(lshr(x, 1), or(y,
INT_MIN))`.
Keep abs(sub) for the signed check (abds, or abdu with non-negative
operands) and use just sub when abdu and `a >= b`.
Fixes #233087 .
(cherry picked from commit f16dbe0ec4b653736148c78bebdefcfe1c88198e)
2026-10-27 19:04:28 +00:00
..
2026-05-14 14:42:19 +00:00
2026-07-25 22:07:58 +00:00
2026-05-13 15:40:07 +01:00
2026-05-20 14:14:55 +08:00
2026-05-01 11:23:24 -07:00
2026-10-27 19:04:28 +00:00
2026-06-26 13:20:06 +01:00
2026-05-13 15:40:07 +01:00
2026-03-08 19:28:27 +00:00
2026-02-19 23:48:22 +00:00
2026-04-30 09:31:39 -07:00
2026-06-21 17:15:50 -07:00
2026-07-07 13:39:22 +01:00
2026-04-30 09:31:39 -07:00
2026-05-01 11:23:24 -07:00
2026-06-26 13:20:06 +01:00
2026-06-23 12:29:11 +01:00
2026-06-23 12:29:11 +01:00
2026-06-29 08:27:11 +01:00
2026-06-23 12:29:11 +01:00
2026-06-26 13:20:06 +01:00
2026-06-23 12:29:11 +01:00
2026-03-01 09:33:58 +00:00
2026-06-26 13:20:06 +01:00
2026-02-05 13:31:26 +00:00
2026-02-05 13:31:26 +00:00
2026-02-05 13:31:26 +00:00
2026-02-05 13:31:26 +00:00
2026-02-05 12:08:22 +00:00
2026-02-19 23:48:22 +00:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-06-30 18:47:04 -07:00
2026-04-14 08:56:47 -07:00
2026-02-05 13:31:26 +00:00
2026-02-19 07:49:26 -08:00
2026-07-07 13:39:22 +01:00
2026-07-07 13:39:22 +01:00
2026-04-06 20:05:14 +02:00
2026-02-05 13:31:26 +00:00
2026-07-29 18:02:38 +00:00
2026-07-29 18:02:38 +00:00
2026-04-22 18:05:16 +00:00
2026-05-10 09:01:17 +00:00
2026-05-10 09:01:17 +00:00
2026-05-01 15:11:58 +01:00
2026-05-15 14:07:33 -05:00
2026-06-26 13:20:06 +01:00
2026-07-31 08:57:16 +02:00
2026-03-31 09:37:06 -07:00
2026-07-13 09:33:02 +01:00
2026-07-06 18:26:05 -07:00
2026-03-01 09:33:58 +00:00
2026-01-26 15:11:17 +00:00
2026-01-26 15:11:17 +00:00
2026-05-14 09:04:59 -05:00
2026-03-03 12:45:26 +00:00
2026-07-10 16:08:02 +02:00
2026-03-05 08:47:01 +00:00
2026-03-13 09:29:28 +00:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-06-29 12:16:26 +02:00
2026-01-26 15:11:17 +00:00
2026-06-26 13:20:06 +01:00
2026-05-01 15:11:58 +01:00
2026-07-06 18:26:05 -07:00
2026-02-25 12:23:42 +00:00
2026-02-25 12:23:42 +00:00
2026-07-13 11:09:40 -07:00
2026-04-08 19:47:41 -07:00
2026-04-26 12:59:29 +01:00
2026-04-26 12:59:29 +01:00
2026-02-02 16:32:12 +00:00
2026-04-17 12:23:56 +01:00
2026-05-01 15:11:58 +01:00
2026-05-01 11:23:24 -07:00
2026-10-06 09:38:48 +02:00
2026-05-01 11:23:24 -07:00
2026-04-17 12:23:56 +01:00
2026-07-06 18:26:05 -07:00
2026-02-06 14:33:22 +00:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-05-04 15:35:14 +01:00
2026-05-04 15:35:14 +01:00
2026-10-18 20:36:08 +02:00
2026-01-25 18:24:12 -05:00
2026-07-06 18:26:05 -07:00
2026-04-17 12:23:56 +01:00
2026-07-06 18:26:05 -07:00
2026-07-06 18:26:05 -07:00
2026-07-02 10:29:05 +01:00
2026-04-17 12:23:56 +01:00
2026-02-19 17:24:32 +00:00
2026-04-30 20:02:55 -07:00
2026-03-05 08:47:01 +00:00
2026-06-26 13:20:06 +01:00
2026-01-14 10:26:05 +00:00
2026-06-26 13:20:06 +01:00
2026-07-06 18:26:05 -07:00
2026-07-06 18:26:05 -07:00
2026-04-02 09:57:00 +02:00
2026-07-06 18:26:05 -07:00
2026-03-03 10:39:21 +00:00
2026-04-22 18:05:16 +00:00
2026-04-06 14:16:01 +02:00
2026-06-26 13:20:06 +01:00
2026-04-11 06:16:43 +00:00
2026-03-08 19:28:27 +00:00
2026-07-06 18:26:05 -07:00
2026-04-13 13:02:36 -07:00
2026-04-08 10:20:54 -07:00
2026-04-08 10:20:54 -07:00
2026-05-01 15:11:58 +01:00
2026-05-01 15:11:58 +01:00
2026-05-18 17:55:56 +03:00
2026-05-18 17:55:56 +03:00
2026-03-20 16:23:18 +01:00
2026-02-05 08:47:56 -08:00
2026-04-16 08:44:48 +08:00
2026-02-26 00:33:21 +01:00
2026-04-13 13:02:36 -07:00
2026-05-01 15:11:58 +01:00
2026-02-05 13:31:26 +00:00
2026-06-26 13:20:06 +01:00
2026-06-24 14:38:41 +00:00
2026-04-08 10:20:54 -07:00
2026-04-08 10:20:54 -07:00
2026-07-06 18:26:05 -07:00
2026-01-12 10:01:57 +01:00
2026-02-12 17:42:13 +08:00
2026-07-16 18:08:12 +00:00
2026-07-06 18:26:05 -07:00
2026-07-07 13:39:22 +01:00
2026-02-02 16:32:12 +00:00
2026-07-07 21:29:15 +00:00
2026-05-01 15:11:58 +01:00
2026-08-20 21:09:04 +00:00
2026-04-27 15:56:12 +01:00
2026-06-26 13:20:06 +01:00
2026-03-01 09:33:58 +00:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-05-07 13:16:14 -04:00
2026-03-01 09:33:58 +00:00
2026-06-26 13:20:06 +01:00
2026-05-10 23:58:48 +08:00
2026-01-26 15:11:17 +00:00
2026-03-25 08:34:18 +00:00
2026-06-26 13:20:06 +01:00
2026-01-25 18:24:12 -05:00
2026-03-05 08:47:01 +00:00
2026-03-13 09:29:28 +00:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-06-26 13:20:06 +01:00
2026-07-24 19:10:06 +02:00
2026-05-18 17:55:56 +03:00
2026-05-18 17:55:56 +03:00