Craig Topper
f107123a88
[X86] Type legalize v2i32 div/rem by scalarizing rather than promoting
...
Summary:
Previously we type legalized v2i32 div/rem by promoting to v2i64. But we don't support div/rem of vectors so op legalization would then scalarize it using i64 scalar ops since it doesn't know about the original promotion. 64-bit scalar divides on Intel hardware are known to be slow and in 32-bit mode they require a libcall.
This patch switches type legalization to do the scalarizing itself using i32.
It looks like the division by power of 2 optimization is still kicking in and leaving the code as a vector. The division by other constant optimization doesn't kick in pre type legalization since it ignores illegal types. And previously, after type legalization we scalarized the v2i64 since we don't have v2i64 MULHS/MULHU support.
Another option might be to widen v2i32 to v4i32 so we could do division by constant optimizations, but we'd have to be careful to only do that for constant divisors or we risk scalaring to 4 scalar divides.
Reviewers: RKSimon, spatel
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D51325
llvm-svn: 342114
2018-09-13 06:13:37 +00:00
..
2018-08-03 07:01:10 +00:00
2018-08-31 11:26:51 +00:00
2018-08-25 14:16:03 +00:00
2018-08-09 12:30:02 +00:00
2018-08-11 05:33:00 +00:00
2018-08-01 17:44:37 +00:00
2018-09-07 16:27:55 +00:00
2018-08-24 20:37:09 +00:00
2018-09-08 18:47:56 +00:00
2018-09-12 15:47:34 +00:00
2018-09-12 15:47:34 +00:00
2018-09-10 21:49:01 +00:00
2018-07-31 00:43:54 +00:00
2018-08-26 18:29:33 +00:00
2018-08-03 21:40:44 +00:00
2018-08-11 05:33:00 +00:00
2018-08-26 18:29:33 +00:00
2018-08-03 21:40:44 +00:00
2018-09-07 20:56:03 +00:00
2018-08-06 19:23:38 +00:00
2018-08-14 08:00:56 +00:00
2018-08-14 08:00:56 +00:00
2018-08-14 08:00:56 +00:00
2018-08-14 08:00:56 +00:00
2018-07-26 23:22:11 +00:00
2018-08-31 07:05:36 +00:00
2018-07-09 17:43:24 +00:00
2018-07-14 02:05:08 +00:00
2018-08-09 12:30:02 +00:00
2018-08-03 07:01:10 +00:00
2018-07-16 06:56:09 +00:00
2018-07-26 23:22:11 +00:00
2018-07-17 05:48:48 +00:00
2018-07-12 00:29:56 +00:00
2018-08-03 07:01:10 +00:00
2018-08-31 17:17:21 +00:00
2018-07-15 23:32:36 +00:00
2018-08-14 08:00:56 +00:00
2018-08-16 06:20:24 +00:00
2018-08-31 21:31:53 +00:00
2018-08-14 08:00:56 +00:00
2018-07-10 08:26:54 +00:00
2018-08-16 06:20:22 +00:00
2018-08-16 06:20:22 +00:00
2018-07-16 06:56:09 +00:00
2018-08-31 21:31:53 +00:00
2018-07-10 08:26:54 +00:00
2018-07-15 23:32:36 +00:00
2018-07-16 06:56:09 +00:00
2018-07-15 23:32:36 +00:00
2018-08-25 14:56:05 +00:00
2018-07-12 13:29:41 +00:00
2018-07-16 06:56:09 +00:00
2018-07-14 02:05:08 +00:00
2018-07-15 18:51:07 +00:00
2018-08-31 08:30:47 +00:00
2018-08-09 12:30:02 +00:00
2018-08-09 12:30:02 +00:00
2018-08-29 17:28:34 +00:00
2018-07-11 04:51:40 +00:00
2018-09-11 17:57:27 +00:00
2018-08-30 17:31:38 +00:00
2018-07-23 21:14:35 +00:00
2018-07-09 19:06:42 +00:00
2018-08-22 19:39:09 +00:00
2018-07-14 02:05:08 +00:00
2018-08-21 19:47:32 +00:00
2018-08-21 07:49:05 +00:00
2018-08-01 22:56:05 +00:00
2018-07-23 21:14:35 +00:00
2018-08-13 06:06:53 +00:00
2018-07-15 23:32:36 +00:00
2018-09-11 17:57:27 +00:00
2018-08-17 12:25:18 +00:00
2018-08-29 11:30:16 +00:00
2018-08-09 12:30:02 +00:00
2018-08-17 10:52:49 +00:00
2018-08-29 11:30:16 +00:00
2018-08-29 11:30:16 +00:00
2018-08-29 11:30:16 +00:00
2018-09-11 17:57:27 +00:00
2018-08-11 05:33:00 +00:00
2018-08-30 06:01:05 +00:00
2018-09-07 23:07:55 +00:00
2018-07-17 09:45:35 +00:00
2018-08-01 18:38:46 +00:00
2018-08-25 10:02:03 +00:00
2018-09-03 09:41:43 +00:00
2018-08-21 17:15:33 +00:00
2018-07-16 06:56:09 +00:00
2018-08-30 06:01:05 +00:00
2018-09-06 02:03:14 +00:00
2018-08-22 19:39:09 +00:00
2018-08-09 12:30:02 +00:00
2018-07-23 21:14:35 +00:00
2018-07-30 16:13:40 +00:00
2018-07-13 21:03:43 +00:00
2018-07-13 21:03:43 +00:00
2018-07-30 16:13:40 +00:00
2018-07-30 16:13:40 +00:00
2018-07-13 22:09:30 +00:00
2018-07-13 22:09:30 +00:00
2018-08-16 21:54:02 +00:00
2018-07-08 18:04:00 +00:00
2018-07-12 00:29:56 +00:00
2018-07-16 23:10:58 +00:00
2018-07-18 07:31:32 +00:00
2018-07-14 02:05:08 +00:00
2018-07-20 13:58:57 +00:00
2018-08-21 10:26:59 +00:00
2018-08-09 17:00:03 +00:00
2018-08-20 19:28:56 +00:00
2018-09-07 13:27:07 +00:00
2018-09-11 17:57:27 +00:00
2018-08-01 17:18:50 +00:00
2018-08-01 17:17:08 +00:00
2018-07-11 04:51:40 +00:00
2018-08-13 12:10:09 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-07-20 16:20:45 +00:00
2018-09-11 17:57:27 +00:00
2018-07-16 06:56:09 +00:00
2018-07-23 21:14:35 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-07-27 05:56:27 +00:00
2018-08-25 14:56:05 +00:00
2018-08-29 10:51:08 +00:00
2018-08-26 18:20:41 +00:00
2018-08-17 14:47:01 +00:00
2018-09-12 21:09:59 +00:00
2018-07-17 09:45:35 +00:00
2018-08-25 14:16:03 +00:00
2018-08-31 17:17:21 +00:00
2018-09-02 13:56:22 +00:00
2018-08-06 21:16:16 +00:00
2018-08-06 17:30:45 +00:00
2018-07-19 16:42:15 +00:00
2018-07-19 16:42:15 +00:00
2018-08-01 03:53:27 +00:00
2018-08-11 05:33:00 +00:00
2018-07-16 15:42:20 +00:00
2018-08-27 22:29:06 +00:00
2018-07-20 20:10:04 +00:00
2018-08-28 10:14:09 +00:00
2018-07-10 07:58:33 +00:00
2018-07-13 23:48:59 +00:00
2018-07-11 13:30:27 +00:00
2018-07-14 09:40:01 +00:00
2018-07-30 09:59:33 +00:00
2018-08-24 18:05:04 +00:00
2018-08-29 02:12:49 +00:00
2018-08-07 17:35:02 +00:00
2018-08-03 20:14:18 +00:00
2018-07-16 06:56:09 +00:00
2018-07-11 18:09:04 +00:00
2018-07-23 22:15:19 +00:00
2018-08-29 17:28:34 +00:00
2018-08-09 12:37:36 +00:00
2018-07-11 04:51:40 +00:00
2018-09-11 08:20:02 +00:00
2018-07-27 23:04:59 +00:00
2018-07-27 23:04:59 +00:00
2018-08-09 23:27:42 +00:00
2018-07-24 23:44:12 +00:00
2018-08-16 18:39:39 +00:00
2018-07-24 03:07:07 +00:00
2018-07-15 23:32:36 +00:00
2018-09-04 12:38:00 +00:00
2018-09-04 12:38:00 +00:00
2018-08-14 16:00:05 +00:00
2018-08-20 13:05:48 +00:00
2018-09-08 19:32:58 +00:00
2018-08-03 18:00:29 +00:00
2018-07-30 16:15:18 +00:00
2018-07-31 17:12:08 +00:00
2018-08-09 12:30:02 +00:00
2018-09-06 18:42:55 +00:00
2018-07-23 20:19:10 +00:00
2018-09-11 17:57:27 +00:00
2018-08-30 06:01:05 +00:00
2018-08-09 12:30:02 +00:00
2018-07-11 04:51:40 +00:00
2018-09-12 15:47:34 +00:00
2018-09-12 15:47:34 +00:00
2018-08-30 06:01:05 +00:00
2018-09-09 14:13:22 +00:00
2018-07-20 15:20:50 +00:00
2018-07-18 18:01:03 +00:00
2018-07-20 03:50:55 +00:00
2018-07-20 15:27:24 +00:00
2018-08-13 06:53:49 +00:00
2018-08-29 11:23:59 +00:00
2018-08-20 21:08:35 +00:00
2018-08-30 19:35:38 +00:00
2018-09-11 17:57:23 +00:00
2018-09-12 01:57:22 +00:00
2018-08-15 21:21:52 +00:00
2018-08-27 17:20:41 +00:00
2018-09-08 19:32:58 +00:00
2018-09-07 19:14:15 +00:00
2018-09-07 19:14:15 +00:00
2018-07-28 00:27:25 +00:00
2018-07-22 19:44:35 +00:00
2018-08-23 06:06:38 +00:00
2018-08-23 06:06:38 +00:00
2018-08-23 06:06:38 +00:00
2018-07-30 16:50:00 +00:00
2018-07-30 16:50:00 +00:00
2018-08-22 23:19:01 +00:00
2018-09-10 17:40:15 +00:00
2018-09-13 06:13:37 +00:00
2018-08-30 06:26:00 +00:00
2018-08-22 19:39:09 +00:00
2018-08-15 09:35:12 +00:00
2018-08-11 05:33:00 +00:00
2018-08-11 05:33:00 +00:00
2018-08-30 06:01:03 +00:00
2018-07-15 16:27:07 +00:00
2018-08-03 04:49:42 +00:00
2018-08-09 12:37:36 +00:00
2018-08-27 11:56:32 +00:00
2018-07-30 22:21:37 +00:00
2018-09-02 13:56:22 +00:00
2018-08-17 14:46:56 +00:00
2018-09-04 10:59:10 +00:00
2018-09-04 12:38:00 +00:00
2018-09-04 10:59:10 +00:00
2018-09-04 12:38:00 +00:00
2018-07-16 06:56:09 +00:00
2018-09-08 19:32:58 +00:00
2018-08-14 08:00:56 +00:00
2018-08-14 08:00:56 +00:00
2018-08-14 08:00:56 +00:00
2018-08-09 12:30:02 +00:00
2018-07-14 02:05:08 +00:00
2018-09-11 17:57:27 +00:00
2018-08-09 12:30:02 +00:00
2018-07-14 02:05:08 +00:00
2018-08-25 14:56:05 +00:00
2018-08-02 16:48:01 +00:00
2018-07-11 04:51:40 +00:00
2018-07-16 06:56:09 +00:00
2018-07-12 22:14:10 +00:00
2018-07-18 19:55:19 +00:00
2018-09-12 15:47:34 +00:00
2018-09-08 05:08:18 +00:00
2018-08-29 17:28:34 +00:00
2018-08-06 18:44:26 +00:00
2018-07-15 23:32:36 +00:00
2018-08-11 05:33:00 +00:00
2018-08-06 18:44:26 +00:00
2018-07-24 03:18:08 +00:00
2018-07-19 21:52:06 +00:00
2018-08-16 18:39:39 +00:00
2018-08-16 18:39:39 +00:00
2018-08-11 05:33:00 +00:00
2018-09-11 15:34:26 +00:00
2018-09-11 15:34:26 +00:00
2018-09-11 15:34:26 +00:00
2018-09-11 15:34:26 +00:00
2018-08-30 06:01:01 +00:00
2018-08-02 16:48:01 +00:00
2018-07-23 21:14:35 +00:00
2018-09-07 20:56:03 +00:00
2018-07-15 18:51:07 +00:00
2018-08-02 16:48:01 +00:00
2018-07-15 23:32:36 +00:00
2018-09-11 17:57:27 +00:00
2018-07-19 21:52:06 +00:00
2018-08-09 12:30:02 +00:00
2018-07-19 21:52:06 +00:00
2018-07-10 07:58:33 +00:00
2018-07-17 09:45:35 +00:00
2018-07-14 02:05:08 +00:00
2018-07-15 23:32:36 +00:00
2018-08-22 22:52:05 +00:00
2018-07-15 23:32:36 +00:00
2018-07-15 23:32:36 +00:00
2018-09-11 17:57:27 +00:00
2018-07-15 18:51:07 +00:00
2018-08-25 18:01:24 +00:00
2018-08-27 17:20:41 +00:00
2018-08-27 17:20:41 +00:00
2018-08-25 18:01:24 +00:00
2018-08-27 17:20:41 +00:00
2018-08-27 17:20:41 +00:00
2018-09-13 06:13:37 +00:00
2018-08-25 18:01:24 +00:00
2018-07-09 20:52:07 +00:00
2018-07-20 16:20:45 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-08-09 12:30:02 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-09-09 14:13:22 +00:00
2018-08-28 10:14:09 +00:00
2018-08-28 10:37:29 +00:00
2018-08-09 12:30:02 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-28 10:37:29 +00:00
2018-08-02 16:48:01 +00:00
2018-08-09 12:30:02 +00:00
2018-08-25 14:56:05 +00:00
2018-07-15 23:32:36 +00:00
2018-08-15 21:21:52 +00:00
2018-08-15 21:21:52 +00:00
2018-08-29 10:51:08 +00:00
2018-08-29 10:51:08 +00:00
2018-07-15 18:51:08 +00:00
2018-08-03 07:01:10 +00:00
2018-08-29 10:51:08 +00:00
2018-08-15 21:21:52 +00:00
2018-08-15 21:21:52 +00:00
2018-08-14 17:22:37 +00:00
2018-08-14 17:22:37 +00:00
2018-08-15 21:21:52 +00:00
2018-07-17 23:26:20 +00:00
2018-08-29 10:51:08 +00:00
2018-07-16 06:56:09 +00:00
2018-07-11 04:51:40 +00:00
2018-07-16 06:56:09 +00:00
2018-08-20 20:57:35 +00:00
2018-07-15 23:32:36 +00:00
2018-07-14 06:30:30 +00:00
2018-08-25 18:01:24 +00:00
2018-07-15 23:32:36 +00:00
2018-08-28 10:14:09 +00:00
2018-07-10 07:58:33 +00:00
2018-09-11 17:57:27 +00:00
2018-09-11 17:57:27 +00:00
2018-08-29 17:28:34 +00:00
2018-07-31 16:41:12 +00:00
2018-07-31 16:41:12 +00:00
2018-07-26 10:48:20 +00:00
2018-08-30 06:01:05 +00:00
2018-07-11 20:25:49 +00:00
2018-08-09 12:30:02 +00:00
2018-08-24 19:38:29 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00
2018-07-12 14:36:43 +00:00