Mikhail Maltsev
e04ab4fe97
[CodeGen][ARM] Coerce FP16 vectors to integer vectors when needed
...
Summary:
On targets that do not support FP16 natively LLVM currently legalizes
vectors of FP16 values by scalarizing them and promoting to FP32. This
causes problems for the following code:
void foo(int, ...);
typedef __attribute__((neon_vector_type(4))) __fp16 float16x4_t;
void bar(float16x4_t x) {
foo(42, x);
}
According to the AAPCS (appendix A.2) float16x4_t is a containerized
vector fundamental type, so 'foo' expects that the 4 16-bit FP values
are packed into 2 32-bit registers, but instead bar promotes them to
4 single precision values.
Since we already handle scalar FP16 values in the frontend by
bitcasting them to/from integers, this patch adds similar handling for
vector types and homogeneous FP16 vector aggregates.
One existing test required some adjustments because we now generate
more bitcasts (so the patch changes the test to target a machine with
native FP16 support).
Reviewers: eli.friedman, olista01, SjoerdMeijer, javed.absar, efriedma
Reviewed By: javed.absar, efriedma
Subscribers: efriedma, kristof.beyls, cfe-commits, chrib
Differential Revision: https://reviews.llvm.org/D50507
llvm-svn: 342034
2018-09-12 09:19:19 +00:00
..
2018-08-23 10:21:36 +00:00
2018-02-26 17:32:31 +00:00
2018-03-29 17:56:24 +00:00
2018-02-23 19:30:48 +00:00
2018-08-09 02:16:18 +00:00
2018-01-19 17:12:54 +00:00
2018-01-19 17:12:54 +00:00
2018-02-23 19:30:48 +00:00
2018-08-03 14:36:44 +00:00
2018-08-15 12:22:08 +00:00
2018-08-15 12:22:08 +00:00
2018-05-17 13:17:33 +00:00
2018-04-11 14:43:11 +00:00
2018-04-27 14:03:32 +00:00
2018-06-10 09:28:10 +00:00
2018-06-27 13:58:43 +00:00
2018-07-23 13:26:37 +00:00
2018-03-29 17:56:24 +00:00
2018-01-19 17:12:54 +00:00
2018-08-17 12:55:05 +00:00
2018-06-12 09:54:27 +00:00
2018-06-15 10:10:45 +00:00
2018-02-23 19:30:48 +00:00
2018-09-07 16:58:57 +00:00
2018-04-13 18:05:21 +00:00
2018-02-12 11:49:02 +00:00
2018-02-15 19:12:41 +00:00
2018-07-18 00:27:07 +00:00
2018-09-07 16:58:57 +00:00
2018-03-29 17:56:24 +00:00
2018-03-27 17:17:39 +00:00
2018-04-06 15:14:32 +00:00
2018-01-28 17:27:45 +00:00
2018-07-26 18:07:59 +00:00
2018-06-13 18:49:35 +00:00
2018-07-23 13:26:37 +00:00
2018-09-12 09:19:19 +00:00
2018-05-01 20:38:05 +00:00
2018-07-30 17:48:23 +00:00
2018-04-25 19:14:05 +00:00
2018-01-23 10:13:49 +00:00
2018-04-16 23:52:58 +00:00
2017-10-06 23:09:55 +00:00
2018-07-23 13:26:37 +00:00
2018-04-27 14:03:32 +00:00
2018-04-19 15:27:28 +00:00
2018-08-19 16:30:57 +00:00
2018-08-19 16:30:57 +00:00
2018-04-16 23:52:58 +00:00
2018-06-04 21:39:20 +00:00
2018-06-06 18:58:01 +00:00
2018-04-16 23:52:58 +00:00
2018-06-15 10:10:45 +00:00
2018-09-12 09:19:19 +00:00
2018-04-05 15:29:52 +00:00
2018-02-14 00:14:07 +00:00
2018-09-06 18:25:39 +00:00
2018-04-30 19:22:40 +00:00
2018-01-19 17:12:54 +00:00
2018-09-07 23:57:54 +00:00
2018-09-07 21:24:27 +00:00
2018-05-13 07:45:58 +00:00
2018-07-20 14:13:28 +00:00
2017-12-11 21:09:19 +00:00
2018-09-04 12:38:00 +00:00
2018-01-08 21:34:17 +00:00
2018-01-16 19:49:52 +00:00
2018-01-17 04:46:04 +00:00
2018-09-10 21:57:53 +00:00
2018-02-23 19:30:48 +00:00
2018-05-18 11:56:21 +00:00
2018-08-24 04:45:04 +00:00
2018-08-14 08:01:38 +00:00
2018-06-21 16:41:28 +00:00
2018-06-19 21:00:30 +00:00
2017-12-27 10:01:00 +00:00
2018-08-31 22:29:56 +00:00
2017-11-06 07:04:12 +00:00
2018-08-31 22:29:56 +00:00
2018-08-31 20:41:06 +00:00
2018-05-26 18:55:26 +00:00
2018-05-26 18:55:26 +00:00
2018-06-13 07:19:28 +00:00
2018-05-29 03:26:38 +00:00
2018-05-29 03:26:38 +00:00
2018-07-10 08:22:44 +00:00
2018-05-30 03:38:15 +00:00
2018-08-14 08:01:38 +00:00
2017-11-06 07:04:12 +00:00
2018-06-27 15:57:57 +00:00
2018-06-13 07:19:28 +00:00
2018-05-30 05:26:04 +00:00
2018-05-30 05:26:04 +00:00
2017-12-16 06:10:24 +00:00
2018-07-07 17:03:32 +00:00
2018-06-22 11:59:16 +00:00
2018-07-07 17:03:32 +00:00
2018-07-10 14:47:31 +00:00
2018-06-14 18:43:52 +00:00
2018-06-07 21:39:04 +00:00
2018-09-09 05:22:49 +00:00
2018-08-10 15:09:24 +00:00
2018-09-09 05:22:49 +00:00
2018-03-14 18:19:26 +00:00
2018-08-14 00:15:42 +00:00
2018-05-24 07:09:08 +00:00
2018-05-24 07:09:08 +00:00
2018-08-27 19:53:19 +00:00
2017-11-14 05:20:03 +00:00
2018-08-08 19:55:52 +00:00
2018-05-22 23:02:13 +00:00
2018-05-24 07:09:08 +00:00
2018-05-24 07:09:08 +00:00
2017-10-12 17:21:01 +00:00
2018-08-04 00:57:17 +00:00
2018-05-24 07:09:08 +00:00
2018-08-19 17:32:56 +00:00
2017-12-01 23:15:52 +00:00
2018-04-12 18:42:02 +00:00
2018-05-24 07:09:08 +00:00
2018-02-16 16:01:08 +00:00
2018-03-28 19:40:57 +00:00
2018-07-12 19:44:39 +00:00
2018-07-13 21:32:33 +00:00
2018-07-13 21:32:33 +00:00
2018-06-21 23:46:09 +00:00
2018-02-23 19:30:48 +00:00
2018-04-11 17:51:19 +00:00
2018-04-18 21:51:48 +00:00
2018-04-11 17:51:19 +00:00
2018-02-23 19:30:48 +00:00
2018-07-09 20:09:52 +00:00
2018-07-04 11:29:21 +00:00
2018-07-19 12:44:15 +00:00
2018-06-21 23:46:09 +00:00
2018-06-21 23:46:09 +00:00
2018-06-21 23:46:09 +00:00
2018-06-21 23:46:09 +00:00
2018-08-31 20:57:00 +00:00
2018-06-03 19:42:59 +00:00
2018-07-11 22:19:14 +00:00
2018-05-09 03:51:12 +00:00
2018-05-09 03:51:12 +00:00
2018-03-20 20:42:55 +00:00
2018-08-17 07:33:25 +00:00
2018-08-17 07:33:25 +00:00
2018-08-17 07:33:25 +00:00
2017-10-03 01:27:24 +00:00
2018-03-17 13:31:35 +00:00
2018-08-10 09:49:21 +00:00
2018-06-21 23:22:37 +00:00
2018-03-29 22:08:01 +00:00
2017-10-31 22:39:44 +00:00
2018-02-23 19:30:48 +00:00
2018-03-20 15:48:00 +00:00
2018-07-11 20:17:54 +00:00
2018-05-24 07:09:08 +00:00
2018-09-07 09:21:09 +00:00
2018-09-11 19:42:58 +00:00
2018-08-08 22:23:57 +00:00
2017-11-18 19:31:57 +00:00
2017-11-18 19:31:57 +00:00
2017-12-20 15:50:52 +00:00
2018-01-19 17:12:54 +00:00
2018-05-21 20:36:58 +00:00
2018-04-17 18:41:52 +00:00
2018-08-27 19:53:19 +00:00
2018-04-06 15:14:32 +00:00
2017-10-26 20:08:52 +00:00
2018-03-22 13:53:30 +00:00
2018-05-22 12:41:19 +00:00
2018-02-26 17:32:31 +00:00
2018-02-12 16:12:52 +00:00
2018-01-12 22:19:03 +00:00
2018-08-31 13:56:14 +00:00
2018-08-31 13:56:14 +00:00
2018-08-20 20:14:08 +00:00
2018-06-21 16:53:48 +00:00
2018-08-31 13:56:14 +00:00
2018-08-31 13:56:14 +00:00
2018-08-20 20:14:08 +00:00
2018-08-31 13:56:14 +00:00
2018-02-13 07:49:34 +00:00
2018-08-16 23:56:32 +00:00
2018-04-05 15:29:52 +00:00
2018-02-02 16:08:24 +00:00
2018-07-19 00:44:52 +00:00
2018-05-21 20:36:58 +00:00
2018-02-23 19:30:48 +00:00
2018-08-29 17:26:58 +00:00
2018-08-29 17:26:58 +00:00
2018-04-25 10:09:20 +00:00
2018-02-07 01:46:46 +00:00
2018-06-22 20:23:21 +00:00
2018-07-31 17:42:05 +00:00
2018-03-16 20:36:49 +00:00
2018-07-31 17:42:05 +00:00
2018-09-09 05:22:49 +00:00
2018-02-23 19:30:48 +00:00
2018-05-24 07:09:08 +00:00
2018-03-02 23:52:44 +00:00
2017-12-16 16:11:17 +00:00
2018-02-23 19:30:48 +00:00
2018-03-29 16:35:52 +00:00
2018-07-06 07:14:47 +00:00
2018-07-05 20:38:31 +00:00
2017-12-09 00:02:37 +00:00
2017-12-09 00:02:37 +00:00
2018-05-24 07:09:08 +00:00
2018-04-20 15:33:44 +00:00
2018-04-19 14:27:05 +00:00
2018-07-09 19:00:16 +00:00
2018-05-07 21:47:13 +00:00
2018-08-09 08:02:42 +00:00
2018-03-29 13:54:31 +00:00
2018-03-29 13:54:31 +00:00
2018-06-21 23:46:09 +00:00
2017-10-18 18:10:13 +00:00
2018-07-25 04:29:03 +00:00
2018-02-23 19:30:48 +00:00
2017-11-21 17:30:34 +00:00
2018-05-25 06:34:42 +00:00
2018-08-22 19:05:19 +00:00
2018-01-22 22:29:24 +00:00
2018-01-19 17:12:54 +00:00
2017-11-18 19:31:57 +00:00
2018-05-30 21:11:45 +00:00
2017-12-01 23:15:52 +00:00
2018-08-31 13:56:14 +00:00
2018-08-31 13:56:14 +00:00
2018-06-22 20:23:21 +00:00
2018-05-24 07:09:08 +00:00
2018-07-06 06:54:16 +00:00
2018-03-16 20:36:49 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-06-13 17:54:52 +00:00
2017-12-02 17:52:00 +00:00
2018-07-11 20:26:20 +00:00
2018-02-07 22:15:33 +00:00
2018-02-07 22:15:33 +00:00
2018-07-17 13:13:34 +00:00
2018-02-23 19:30:48 +00:00
2018-03-22 18:03:13 +00:00
2018-07-30 12:27:40 +00:00
2018-07-30 12:27:40 +00:00
2018-07-30 12:27:40 +00:00
2018-02-07 22:15:33 +00:00
2018-01-31 21:59:02 +00:00
2018-05-24 07:09:08 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-03-01 20:22:57 +00:00
2018-03-16 20:36:49 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-03-16 20:36:49 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-04-10 18:43:44 +00:00
2018-06-05 01:33:40 +00:00
2018-08-19 15:31:42 +00:00
2018-08-21 22:19:55 +00:00
2018-06-06 18:39:47 +00:00
2018-05-30 07:54:05 +00:00
2018-08-21 22:19:55 +00:00
2018-02-01 03:04:15 +00:00
2018-02-23 19:30:48 +00:00
2018-06-11 16:10:06 +00:00
2018-04-30 18:19:03 +00:00
2018-01-19 17:12:54 +00:00
2018-06-25 18:47:32 +00:00
2018-07-19 00:44:52 +00:00
2018-02-23 21:27:33 +00:00
2018-07-17 07:12:08 +00:00
2018-02-23 19:30:48 +00:00
2018-01-28 17:27:45 +00:00
2018-01-19 17:12:54 +00:00
2018-01-19 17:12:54 +00:00
2017-10-06 23:09:55 +00:00
2018-06-25 13:23:49 +00:00
2018-09-09 05:22:49 +00:00
2018-02-23 19:30:48 +00:00
2018-05-24 07:09:08 +00:00
2018-03-29 17:56:24 +00:00
2018-01-28 17:27:45 +00:00
2018-01-28 17:27:45 +00:00
2018-07-05 04:32:01 +00:00
2018-01-19 17:12:54 +00:00
2017-10-19 20:11:23 +00:00
2018-04-06 15:14:32 +00:00
2018-02-23 19:30:48 +00:00
2018-08-23 04:09:49 +00:00
2018-02-23 19:30:48 +00:00
2018-02-07 01:46:46 +00:00
2018-07-10 19:55:02 +00:00
2018-03-20 17:33:26 +00:00
2018-05-24 07:09:08 +00:00
2017-11-29 00:54:20 +00:00
2018-09-07 19:14:24 +00:00
2018-05-24 07:09:08 +00:00
2018-05-24 07:09:08 +00:00
2018-02-23 19:30:48 +00:00
2018-02-25 03:58:23 +00:00
2018-01-28 17:27:45 +00:00
2018-08-10 15:09:24 +00:00
2018-04-03 22:33:53 +00:00
2018-01-19 17:12:54 +00:00
2018-05-30 06:02:18 +00:00
2018-05-30 06:02:18 +00:00
2018-06-20 09:49:40 +00:00
2018-05-22 18:52:37 +00:00
2018-02-07 22:15:33 +00:00
2018-08-14 08:01:38 +00:00
2018-05-24 07:09:08 +00:00
2018-06-21 23:39:47 +00:00
2018-05-24 07:09:08 +00:00
2018-07-10 00:37:25 +00:00
2018-05-24 07:09:08 +00:00
2018-02-23 13:47:36 +00:00
2018-05-09 21:41:18 +00:00
2018-01-08 15:46:18 +00:00
2018-08-21 20:41:17 +00:00
2018-03-20 20:42:55 +00:00
2017-10-06 23:09:55 +00:00
2018-08-24 20:18:34 +00:00
2017-11-19 04:12:33 +00:00
2018-08-27 19:53:19 +00:00
2018-06-07 08:48:36 +00:00
2018-06-07 08:48:36 +00:00
2017-12-22 09:57:24 +00:00
2018-05-01 18:14:36 +00:00
2018-05-01 18:14:36 +00:00
2018-05-01 18:14:36 +00:00
2018-05-01 18:14:36 +00:00
2018-05-01 18:14:36 +00:00
2018-05-01 18:14:36 +00:00
2018-01-25 14:21:55 +00:00
2017-12-22 09:54:23 +00:00
2018-02-23 19:30:48 +00:00
2018-05-05 14:37:29 +00:00
2018-04-12 22:21:36 +00:00
2017-11-13 15:38:33 +00:00
2018-08-05 14:53:34 +00:00
2018-02-16 23:38:22 +00:00
2018-06-26 15:50:34 +00:00
2018-06-26 15:50:34 +00:00
2018-02-14 22:41:15 +00:00
2018-05-31 18:25:59 +00:00
2018-01-22 22:29:24 +00:00
2018-08-16 23:19:50 +00:00
2017-12-21 00:10:25 +00:00
2017-12-08 19:51:42 +00:00
2018-05-21 20:36:58 +00:00
2017-12-03 03:10:13 +00:00
2018-05-07 21:47:13 +00:00
2018-02-23 19:30:48 +00:00
2018-06-04 21:39:20 +00:00
2018-02-10 17:55:23 +00:00
2018-06-21 23:39:47 +00:00
2018-02-23 19:30:48 +00:00
2018-07-19 00:44:52 +00:00
2018-02-23 19:30:48 +00:00
2018-01-19 17:12:54 +00:00
2018-05-07 21:47:13 +00:00
2018-05-24 07:09:08 +00:00
2018-08-31 20:57:00 +00:00
2018-08-31 20:57:00 +00:00
2018-03-20 20:42:55 +00:00
2017-10-06 23:09:55 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-03-29 17:56:24 +00:00
2018-01-24 18:59:58 +00:00
2018-01-28 17:27:45 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2018-01-28 17:27:45 +00:00
2018-02-02 15:53:35 +00:00
2017-11-14 21:13:27 +00:00
2018-01-19 17:12:54 +00:00
2018-07-09 19:00:16 +00:00
2018-05-18 11:56:21 +00:00
2018-08-14 20:21:05 +00:00
2018-05-24 07:09:08 +00:00
2018-01-19 17:12:54 +00:00
2017-11-30 00:04:54 +00:00
2018-04-17 21:32:43 +00:00
2018-04-09 04:02:09 +00:00
2018-04-09 04:02:09 +00:00
2018-04-09 04:02:09 +00:00
2018-04-17 21:32:43 +00:00
2018-04-09 04:02:09 +00:00
2018-04-17 21:32:43 +00:00