Antonio Maiorano
821f9bb525
Fix FXC compile errors on divide by zero
...
FXC fails to compile when it determines that the rhs of an integral
division is zero with "error X4010: Unsigned integer divide by zero".
bclayton's fix (https://dawn-review.googlesource.com/c/tint/+/60500 )
addressed cases for division by an integer constant 0. This CL adds the
missing support for division by integral vectors with 0 components.
FXC also fails on division by integral expressions that it can fold to
0. To handle these cases, we now emit a runtime check for 0 and replace
by 1. In the cases I've tested, FXC seems able to optimize these checks
away.
Bug: tint:1083
Change-Id: I02f08e9077882f03c1e42b62dacb742a48fa48ba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/73580
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-12-21 14:48:26 +00:00
..
2021-07-13 16:41:56 +00:00
2021-11-16 15:15:36 +00:00
2021-07-13 16:41:56 +00:00
2021-10-20 16:12:33 +00:00
2021-07-13 16:41:56 +00:00
2021-07-13 16:41:56 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-06-10 17:34:44 +00:00
2021-12-09 15:45:03 +00:00
2021-06-16 09:50:11 +00:00
2021-11-16 15:15:36 +00:00
2021-08-04 22:15:28 +00:00
2021-08-04 22:15:28 +00:00
2021-08-05 17:34:19 +00:00
2021-06-16 09:50:11 +00:00
2021-12-09 15:45:03 +00:00
2021-11-16 15:15:36 +00:00
2021-06-16 09:19:36 +00:00
2021-10-28 15:00:39 +00:00
2021-06-16 09:19:36 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-11-16 15:15:36 +00:00
2021-07-08 12:00:31 +00:00
2021-10-28 15:00:39 +00:00
2021-07-08 12:00:31 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-06-10 18:49:14 +00:00
2021-11-19 19:06:23 +00:00
2021-10-14 10:10:45 +00:00
2021-10-20 16:12:33 +00:00
2021-10-14 10:10:45 +00:00
2021-11-04 19:55:57 +00:00
2021-11-04 19:55:57 +00:00
2021-11-19 19:06:23 +00:00
2021-10-14 10:10:45 +00:00
2021-10-20 16:12:33 +00:00
2021-10-14 10:10:45 +00:00
2021-11-04 19:55:57 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-06-16 09:19:36 +00:00
2021-10-28 15:00:39 +00:00
2021-06-10 17:34:44 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-05-17 21:01:37 +00:00
2021-12-09 15:45:03 +00:00
2021-12-18 21:28:23 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-06-10 18:49:14 +00:00
2021-11-16 15:15:36 +00:00
2021-06-16 09:19:36 +00:00
2021-06-10 18:49:14 +00:00
2021-06-10 18:49:14 +00:00
2021-06-10 18:49:14 +00:00
2021-05-17 21:01:37 +00:00
2021-11-16 15:15:36 +00:00
2021-07-05 15:20:57 +00:00
2021-06-16 09:19:36 +00:00
2021-05-18 09:24:18 +00:00
2021-05-18 09:24:18 +00:00
2021-06-10 18:49:14 +00:00
2021-12-21 01:48:13 +00:00
2021-12-09 15:45:03 +00:00
2021-11-08 20:16:48 +00:00
2021-11-08 20:16:48 +00:00
2021-11-08 20:16:48 +00:00
2021-06-10 18:49:14 +00:00
2021-12-21 01:48:13 +00:00
2021-12-09 15:45:03 +00:00
2021-11-08 20:16:48 +00:00
2021-11-08 20:16:48 +00:00
2021-11-08 20:16:48 +00:00
2021-06-16 17:42:53 +00:00
2021-11-16 15:15:36 +00:00
2021-08-04 22:15:28 +00:00
2021-10-20 16:12:33 +00:00
2021-08-05 17:34:19 +00:00
2021-06-16 17:42:53 +00:00
2021-06-16 17:42:53 +00:00
2021-11-16 15:15:36 +00:00
2021-11-23 20:45:51 +00:00
2021-11-23 20:45:51 +00:00
2021-06-16 17:42:53 +00:00
2021-06-16 17:42:53 +00:00
2021-12-09 15:45:03 +00:00
2021-11-19 19:06:23 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-06-16 09:50:11 +00:00
2021-12-09 15:45:03 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-06-17 09:10:04 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-21 01:48:13 +00:00
2021-09-20 14:38:45 +00:00
2021-10-28 15:00:39 +00:00
2021-09-20 14:38:45 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-07-02 22:17:25 +00:00
2021-12-21 01:48:13 +00:00
2021-11-25 18:44:50 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-21 01:48:13 +00:00
2021-11-25 18:44:50 +00:00
2021-12-03 21:50:23 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-21 01:48:13 +00:00
2021-11-25 18:44:50 +00:00
2021-12-03 21:50:23 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-07-06 09:43:49 +00:00
2021-12-21 01:48:13 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-10-22 00:21:44 +00:00
2021-10-28 15:00:39 +00:00
2021-10-22 00:21:44 +00:00
2021-12-09 15:45:03 +00:00
2021-07-15 22:36:44 +00:00
2021-12-21 01:48:13 +00:00
2021-08-04 22:15:28 +00:00
2021-10-28 15:00:39 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-07-14 18:01:36 +00:00
2021-11-16 15:15:36 +00:00
2021-08-04 22:15:28 +00:00
2021-08-12 19:47:20 +00:00
2021-08-05 17:34:19 +00:00
2021-07-14 18:01:36 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-08-04 22:15:28 +00:00
2021-12-03 21:50:23 +00:00
2021-08-05 17:34:19 +00:00
2021-12-09 15:45:03 +00:00
2021-07-15 22:20:29 +00:00
2021-11-16 15:15:36 +00:00
2021-11-25 18:44:50 +00:00
2021-07-15 22:20:29 +00:00
2021-07-15 22:20:29 +00:00
2021-07-15 22:20:29 +00:00
2021-07-18 15:41:25 +00:00
2021-11-22 16:14:16 +00:00
2021-08-04 22:15:28 +00:00
2021-08-04 22:15:28 +00:00
2021-08-05 17:34:19 +00:00
2021-07-18 15:41:25 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-07-15 20:29:09 +00:00
2021-10-28 15:00:39 +00:00
2021-07-15 20:29:09 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-18 21:28:23 +00:00
2021-10-28 15:00:39 +00:00
2021-07-15 20:29:09 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-21 01:48:13 +00:00
2021-10-22 00:21:44 +00:00
2021-10-28 15:00:39 +00:00
2021-10-22 00:21:44 +00:00
2021-12-09 15:45:03 +00:00
2021-07-29 18:05:19 +00:00
2021-11-16 15:15:36 +00:00
2021-11-25 18:44:50 +00:00
2021-07-29 18:05:19 +00:00
2021-07-29 18:05:19 +00:00
2021-07-29 18:05:19 +00:00
2021-08-04 22:15:28 +00:00
2021-11-16 15:15:36 +00:00
2021-08-04 22:15:28 +00:00
2021-08-04 22:15:28 +00:00
2021-08-05 17:34:19 +00:00
2021-08-04 22:15:28 +00:00
2021-11-10 14:38:34 +00:00
2021-11-16 15:15:36 +00:00
2021-11-25 18:44:50 +00:00
2021-11-10 14:38:34 +00:00
2021-11-10 14:38:34 +00:00
2021-11-10 14:38:34 +00:00
2021-07-29 18:05:19 +00:00
2021-11-16 15:15:36 +00:00
2021-10-14 10:10:45 +00:00
2021-07-29 18:05:19 +00:00
2021-07-29 18:05:19 +00:00
2021-07-29 18:05:19 +00:00
2021-08-04 19:18:38 +00:00
2021-11-16 15:15:36 +00:00
2021-08-04 19:18:38 +00:00
2021-08-04 19:18:38 +00:00
2021-08-04 19:18:38 +00:00
2021-08-04 19:18:38 +00:00
2021-08-06 19:48:32 +00:00
2021-12-09 15:45:03 +00:00
2021-08-10 16:16:55 +00:00
2021-10-28 15:00:39 +00:00
2021-08-10 16:16:55 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-12-21 14:48:26 +00:00
2021-12-03 21:50:23 +00:00
2021-08-12 18:23:10 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 18:54:35 +00:00
2021-11-25 18:44:50 +00:00
2021-12-03 21:50:23 +00:00
2021-11-05 16:51:38 +00:00
2021-12-09 15:45:03 +00:00
2021-12-09 15:45:03 +00:00
2021-11-16 15:15:36 +00:00
2021-08-26 15:40:06 +00:00
2021-10-28 15:00:39 +00:00
2021-08-26 15:40:06 +00:00
2021-12-09 15:45:03 +00:00
2021-11-25 18:02:36 +00:00
2021-11-26 15:28:49 +00:00
2021-11-25 18:02:36 +00:00
2021-11-25 18:02:36 +00:00
2021-11-25 18:02:36 +00:00