Yingwei Zheng
59eae919c9
[ValueTracking] Don't use CondContext in dataflow analysis of phi nodes (#100316)
See the following case:
```
define i16 @pr100298() {
entry:
br label %for.inc
for.inc:
%indvar = phi i32 [ -15, %entry ], [ %mask, %for.inc ]
%add = add nsw i32 %indvar, 9
%mask = and i32 %add, 65535
%cmp1 = icmp ugt i32 %mask, 5
br i1 %cmp1, label %for.inc, label %for.end
for.end:
%conv = trunc i32 %add to i16
%cmp2 = icmp ugt i32 %mask, 3
%shl = shl nuw i16 %conv, 14
%res = select i1 %cmp2, i16 %conv, i16 %shl
ret i16 %res
}
```
When computing knownbits of `%shl` with `%cmp2=false`, we cannot use
this condition in the analysis of `%mask (%for.inc -> %for.inc)`.
Fixes https://github.com/llvm/llvm-project/issues/100298.
2024-07-24 20:06:36 +08:00
..
2024-06-25 12:36:40 -07:00
2024-01-17 09:31:00 +01:00
2024-06-28 08:36:49 +02:00
2024-03-31 22:47:55 -07:00
2024-04-09 20:12:26 +02:00
2023-11-21 14:34:02 +01:00
2024-03-04 16:53:27 -06:00
2024-06-28 08:36:49 +02:00
2024-05-07 10:20:10 -07:00
2024-02-27 14:13:00 -05:00
2024-06-27 16:38:15 +02:00
2024-06-25 06:57:30 -07:00
2024-06-21 23:50:53 +03:30
2024-06-28 14:30:47 +02:00
2024-06-27 16:38:15 +02:00
2024-05-21 09:48:03 -07:00
2023-11-26 01:46:31 -08:00
2024-07-10 09:54:56 -07:00
2024-05-29 06:13:02 +01:00
2024-04-18 15:44:12 +09:00
2024-06-06 13:13:46 +05:30
2024-07-15 14:59:16 +08:00
2024-06-25 06:57:30 -07:00
2023-11-21 00:52:23 -08:00
2024-06-21 23:50:53 +03:30
2024-06-14 22:49:36 -07:00
2024-06-27 16:38:15 +02:00
2024-06-28 08:36:49 +02:00
2024-06-28 08:08:19 -07:00
2024-03-04 16:53:27 -06:00
2024-06-28 19:57:53 +08:00
2024-06-21 23:50:53 +03:30
2024-04-19 10:01:42 -07:00
2023-09-20 11:27:54 +02:00
2024-06-21 23:50:53 +03:30
2024-07-01 14:54:59 -07:00
2024-06-28 14:30:47 +02:00
2024-07-09 15:08:04 +08:00
2024-03-26 15:59:31 -07:00
2024-07-01 17:47:13 -07:00
2023-11-21 00:51:52 -08:00
2024-07-16 11:40:04 +02:00
2024-01-27 09:32:22 -08:00
2024-07-15 20:21:50 +01:00
2024-06-27 16:38:15 +02:00
2024-06-11 09:50:13 -07:00
2024-07-19 08:46:41 +02:00
2024-07-16 14:48:59 +01:00
2024-07-22 16:22:01 +02:00
2024-06-04 10:00:26 +02:00
2024-07-18 22:09:05 +01:00
2024-06-21 23:50:53 +03:30
2024-05-27 09:54:39 -04:00
2024-06-28 14:30:47 +02:00
2024-06-28 14:30:47 +02:00
2024-06-27 16:38:15 +02:00
2024-06-28 08:36:49 +02:00
2024-06-27 16:38:15 +02:00
2024-06-27 16:38:15 +02:00
2024-06-27 16:38:15 +02:00
2024-07-10 09:41:36 -07:00
2024-05-02 11:01:24 +01:00
2024-01-24 10:15:42 +01:00
2024-07-03 10:14:49 -07:00
2024-07-11 16:10:30 -07:00
2024-06-27 16:38:15 +02:00
2024-06-28 08:36:49 +02:00
2024-06-25 06:57:30 -07:00
2023-09-30 18:51:28 -07:00
2023-10-22 12:15:46 -07:00
2024-03-31 19:45:12 -07:00
2024-07-09 09:14:33 +02:00
2024-05-30 10:50:32 +08:00
2024-06-21 23:50:53 +03:30
2023-07-05 18:11:44 +01:00
2023-07-28 12:13:35 -07:00
2024-06-28 08:36:49 +02:00
2024-06-28 08:36:49 +02:00
2024-06-28 14:30:47 +02:00
2024-07-19 16:35:59 +08:00
2024-07-23 07:47:21 +08:00
2023-10-11 08:04:04 -07:00
2023-11-16 12:50:46 -08:00
2024-06-28 14:30:47 +02:00
2024-04-15 11:40:23 -07:00
2023-07-27 09:54:50 +05:30
2024-07-24 20:06:36 +08:00
2024-07-16 15:50:21 +01:00