Florian Hahn
fd97dfbb78
[LV] Don't mark ptrs as safe to speculate if fed by UB/poison op. ( #143204 )
...
Add additional checks before marking pointers safe to load
speculatively. If some computations feeding the pointer may trigger UB,
we cannot load the pointer speculatively, because we cannot compute the
address speculatively. The UB triggering instructions will be
predicated, but if the predicated block does not execute the result is
poison.
Similarly, we also cannot load the pointer speculatively if it may be
poison. The patch also checks if any of the operands defined outside the
loop may be poison when entering the loop. We *don't* need to check if
any operation inside the loop may produce poison due to flags, as those
will be dropped if needed.
There are some types of instructions inside the loop that can produce
poison independent of flags. Currently loads are also checked, not sure
if there's a convenient API to check for all such operands.
Fixes https://github.com/llvm/llvm-project/issues/142957 .
PR: https://github.com/llvm/llvm-project/pull/143204
2025-06-20 13:05:19 +01:00
..
2025-05-19 13:27:17 +01:00
2024-10-29 10:09:55 +00:00
2024-10-29 10:09:55 +00:00
2024-11-21 08:06:56 +00:00
2025-03-28 14:47:40 +00:00
2025-06-17 18:24:07 +01:00
2025-03-26 21:03:50 +00:00
2025-01-14 22:07:38 +00:00
2025-04-28 20:01:37 +01:00
2025-06-09 20:59:12 +01:00
2025-04-04 15:44:26 +01:00
2025-04-28 20:01:37 +01:00
2025-06-20 13:05:19 +01:00
2024-07-14 20:49:03 +01:00
2025-03-26 21:03:50 +00:00
2025-06-15 22:00:47 +01:00
2025-04-14 17:11:13 +02:00
2025-04-15 08:08:45 +08:00
2024-11-19 08:55:39 +00:00
2025-03-25 12:57:24 +00:00
2025-04-28 20:01:37 +01:00
2025-06-02 17:40:50 +01:00
2025-03-25 12:57:24 +00:00
2025-03-26 21:03:50 +00:00
2025-06-17 18:24:07 +01:00
2025-03-26 21:03:50 +00:00
2025-06-17 18:24:07 +01:00
2024-10-08 12:08:13 +01:00
2024-10-09 13:18:54 +01:00
2025-03-25 12:57:24 +00:00
2025-03-25 12:57:24 +00:00
2025-04-14 17:11:13 +02:00
2025-02-09 11:20:20 +00:00
2025-02-09 11:20:20 +00:00
2025-02-26 13:57:51 +00:00
2025-03-26 21:03:50 +00:00
2025-05-07 11:05:25 +01:00
2025-05-07 11:05:25 +01:00
2025-05-07 11:05:25 +01:00
2025-03-26 21:03:50 +00:00
2025-03-26 21:03:50 +00:00
2025-04-28 20:01:37 +01:00
2025-04-28 20:01:37 +01:00
2025-03-26 21:03:50 +00:00
2024-11-19 08:55:39 +00:00
2025-03-25 12:57:24 +00:00
2025-04-04 15:44:26 +01:00
2025-06-17 18:24:07 +01:00
2025-04-14 17:11:13 +02:00
2024-07-15 09:59:46 +01:00
2025-02-09 11:20:20 +00:00
2025-05-28 11:00:14 +02:00
2025-03-26 21:03:50 +00:00
2025-03-25 12:57:24 +00:00
2024-11-21 08:06:56 +00:00
2024-12-09 16:44:05 +01:00
2025-04-11 14:31:08 +01:00
2025-03-15 21:32:48 +00:00
2025-04-24 08:37:49 +01:00
2025-02-26 13:57:51 +00:00
2025-04-28 20:01:37 +01:00
2025-03-25 12:57:24 +00:00
2025-06-15 22:00:47 +01:00
2025-04-04 15:44:26 +01:00
2025-03-11 21:19:14 +00:00
2025-06-15 22:00:47 +01:00
2025-06-02 14:56:35 +01:00
2025-03-26 21:03:50 +00:00
2024-10-02 20:16:41 +01:00
2024-11-21 08:06:56 +00:00
2025-04-01 14:11:20 +01:00
2025-03-26 21:03:50 +00:00
2025-06-09 20:59:12 +01:00
2024-11-20 09:10:51 +00:00
2025-06-02 17:40:50 +01:00
2025-06-02 17:40:50 +01:00
2025-05-28 11:00:14 +02:00
2025-05-28 11:00:14 +02:00
2025-06-17 18:24:07 +01:00
2025-05-28 11:00:14 +02:00
2025-01-29 16:56:47 +01:00
2025-04-24 08:37:49 +01:00
2025-02-09 11:20:20 +00:00
2024-06-05 15:01:33 -04:00
2025-04-17 11:50:49 +01:00
2025-03-15 21:13:49 +00:00
2025-03-25 20:57:10 +00:00
2024-12-24 20:23:48 +00:00
2025-05-28 11:00:14 +02:00
2025-03-26 21:03:50 +00:00
2025-01-12 22:03:21 +00:00
2024-11-19 08:55:39 +00:00
2024-07-28 20:57:43 -04:00
2025-04-04 15:44:26 +01:00
2024-11-19 08:55:39 +00:00
2025-01-09 12:05:19 +00:00
2025-04-04 15:44:26 +01:00
2025-04-04 15:44:26 +01:00
2024-11-06 11:53:33 +00:00
2025-03-28 21:48:59 +00:00
2025-03-26 21:03:50 +00:00
2024-12-18 19:06:34 +01:00
2025-03-18 22:35:18 +00:00
2024-12-05 14:36:40 +01:00
2024-11-06 11:53:33 +00:00
2025-03-25 12:57:24 +00:00