Liren Peng
06f06644ef
[SeparateConstOffsetFromGEP] Fix: b - a matched a - b during reuniteExts
During the SeparateConstOffsetFromGEP pass, a - b and b - a will be
considered equivalent in some instances.
An example- the IR contains:
BB1:
%add = add %a, 511
br label %BB2
BB2:
%sub2 = sub %b, %a
br label %BB3
BB3:
%sub1 = sub %add, %b
%gep = getelementptr float, ptr %p, %sub1
Step 1 in the SeparateConstOffsetFromGEP pass, after split constant index:
BB1:
%add = add %a, 511
br label %BB2
BB2:
%sub2 = sub %b, %a
br label %BB3
BB3:
%sub.t = sub %a, %b
%gep.base = getelementptr float, ptr %p, %sub.t
%gep = getelementptr float, ptr %gep.base, 511
Step 2, after reuniteExts:
BB1:
br label %BB2
BB2:
%sub2 = sub %b, %a
br label %BB3
BB3:
%gep.base = getelementptr float, ptr %p, %sub2
%gep = getelementptr float, ptr %gep.base, 511
Obviously, reuniteExts treated a - b and b - a as equivalent.
This patch fixes that.
Reviewed By: nikic, spatel
Differential Revision: https://reviews.llvm.org/D143542
2023-02-15 02:33:31 +00:00
..
2022-11-15 13:13:38 +00:00
2022-12-02 21:11:37 -08:00
2022-12-05 07:51:17 +00:00
2023-01-10 21:06:06 -07:00
2022-08-27 23:54:32 -07:00
2022-10-13 07:17:25 -07:00
2023-01-22 20:05:51 +01:00
2023-02-14 15:15:57 +00:00
2023-01-29 10:03:15 -08:00
2023-02-03 12:08:45 +03:00
2022-10-16 16:21:00 -07:00
2022-12-28 11:24:18 -07:00
2023-01-12 17:31:36 +00:00
2022-12-13 08:05:14 +00:00
2023-01-31 20:08:52 +07:00
2023-02-02 16:38:39 +03:00
2022-08-20 21:18:25 -07:00
2022-12-14 21:16:22 -08:00
2023-01-05 14:11:08 +01:00
2023-01-25 14:41:29 +07:00
2022-09-29 08:43:37 +00:00
2023-02-01 12:52:37 +00:00
2023-01-23 11:59:32 +01:00
2022-10-01 15:44:27 +01:00
2023-02-13 22:49:09 -08:00
2023-02-14 15:51:09 -08:00
2023-01-12 08:08:11 -08:00
2023-01-14 13:53:40 -08:00
2023-01-12 18:53:07 +00:00
2022-11-26 17:14:23 -08:00
2023-01-16 14:36:06 -05:00
2023-02-14 16:00:49 -08:00
2022-12-20 13:28:30 +01:00
2023-01-19 14:26:26 +01:00
2023-01-12 21:00:35 -08:00
2022-11-26 17:21:19 -08:00
2022-11-26 17:24:20 -08:00
2023-01-05 14:11:08 +01:00
2023-02-10 16:52:00 +08:00
2023-02-14 17:23:15 -08:00
2022-12-19 09:55:29 -05:00
2022-12-05 08:12:26 +01:00
2022-11-26 17:33:11 -08:00
2022-12-22 17:33:52 -05:00
2023-01-11 15:21:59 -08:00
2023-01-16 14:22:03 +00:00
2022-12-27 12:49:30 +01:00
2023-01-12 18:14:47 -08:00
2023-01-11 16:49:38 +00:00
2023-01-05 14:11:08 +01:00
2022-11-26 17:36:26 -08:00
2022-10-13 07:17:25 -07:00
2022-09-12 12:28:34 -04:00
2022-11-14 12:47:39 +01:00
2023-01-25 20:47:16 +03:00
2023-02-14 17:23:15 -08:00
2022-11-26 17:39:36 -08:00
2022-12-13 08:05:14 +00:00
2023-01-23 17:41:33 +00:00
2023-02-15 02:33:31 +00:00
2023-02-14 19:54:19 +07:00
2022-12-15 12:27:45 -08:00
2022-11-18 01:23:12 +00:00
2022-08-18 11:55:23 +01:00
2023-02-10 18:10:11 +00:00
2022-11-04 13:39:49 +00:00
2022-12-12 16:22:12 -08:00
2023-01-10 12:16:31 +01:00
2023-02-07 12:56:05 -08:00