James Molloy
d594ba0815
Reapply r237539 with a fix for the Chromium build.
...
Make sure if we're truncating a constant that would then be sign extended
that the sign extension of the truncated constant is the same as the
original constant.
> Canonicalize min/max expressions correctly.
>
> This patch introduces a canonical form for min/max idioms where one operand
> is extended or truncated. This often happens when the other operand is a
> constant. For example:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = sext i32 %a to i64
> %3 = select i1 %1, i64 %2, i64 0
>
> Would now be canonicalized into:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = select i1 %1, i32 %a, i32 0
> %3 = sext i32 %2 to i64
>
> This builds upon a patch posted by David Majenemer
> (https://www.marc.info/?l=llvm-commits&m=143008038714141&w=2 ). That pass
> passively stopped instcombine from ruining canonical patterns. This
> patch additionally actively makes instcombine canonicalize too.
>
> Canonicalization of expressions involving a change in type from int->fp
> or fp->int are not yet implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-20 18:41:25 +00:00
..
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-03-24 21:50:35 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-07-30 22:51:54 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-11-24 23:03:17 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2014-05-24 12:50:23 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2014-06-12 14:06:00 +00:00
2014-12-15 19:07:53 +00:00
2015-02-27 21:17:42 +00:00
2014-06-02 21:23:54 +00:00
2014-06-17 00:42:07 +00:00
2014-12-01 09:27:46 +00:00
2014-12-15 19:07:53 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-05-11 06:37:03 +00:00
2015-04-16 23:24:18 +00:00
2014-10-12 14:02:34 +00:00
2014-11-27 11:22:49 +00:00
2014-11-27 11:22:49 +00:00
2015-01-06 08:41:31 +00:00
2014-10-13 22:37:51 +00:00
2014-09-07 19:21:07 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-12-15 19:07:53 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-05-27 16:54:33 +00:00
2015-03-10 22:52:37 +00:00
2014-12-04 09:44:01 +00:00
2015-04-16 23:24:18 +00:00
2014-04-30 17:22:00 +00:00
2015-03-11 18:03:05 +00:00
2015-03-27 22:04:28 +00:00
2015-04-16 23:24:18 +00:00
2014-12-15 19:07:53 +00:00
2015-02-27 21:17:42 +00:00
2014-02-20 23:00:15 +00:00
2015-01-06 15:50:59 +00:00
2015-05-12 16:47:30 +00:00
2014-03-24 04:36:06 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-10 05:13:47 +00:00
2014-10-01 20:36:33 +00:00
2014-03-06 05:32:52 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-03-08 21:53:59 +00:00
2015-04-30 22:05:30 +00:00
2015-02-27 19:29:02 +00:00
2014-06-26 08:57:33 +00:00
2015-02-27 21:17:42 +00:00
2014-11-22 20:00:41 +00:00
2015-03-10 22:43:20 +00:00
2014-10-23 21:52:45 +00:00
2015-02-27 19:29:02 +00:00
2015-04-16 23:24:18 +00:00
2014-02-04 20:27:23 +00:00
2015-03-04 18:43:29 +00:00
2014-10-14 20:43:11 +00:00
2015-03-05 08:38:57 +00:00
2015-03-09 03:20:25 +00:00
2014-06-17 00:42:07 +00:00
2014-12-03 21:46:33 +00:00
2015-02-27 21:17:42 +00:00
2014-11-04 05:17:58 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-12-12 04:34:07 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-05-12 23:52:24 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-19 11:05:08 +00:00
2015-04-21 23:02:15 +00:00
2014-11-18 09:31:41 +00:00
2015-02-27 21:17:42 +00:00
2014-10-21 19:51:55 +00:00
2015-03-26 17:12:06 +00:00
2015-03-11 15:12:32 +00:00
2014-03-07 10:24:44 +00:00
2015-04-13 19:17:37 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-01-28 01:17:38 +00:00
2015-03-13 18:20:45 +00:00
2015-03-04 18:43:29 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-04-30 04:56:04 +00:00
2014-10-21 23:00:20 +00:00
2015-02-27 21:17:42 +00:00
2015-03-21 22:04:26 +00:00
2015-02-27 21:17:42 +00:00
2015-01-27 21:52:16 +00:00
2015-03-13 18:20:45 +00:00
2015-01-27 21:52:16 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-01-27 21:52:16 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-05-20 18:41:25 +00:00
2015-01-06 23:00:33 +00:00
2015-04-18 04:41:30 +00:00
2015-02-27 21:17:42 +00:00
2014-12-19 17:12:35 +00:00
2014-11-12 18:25:47 +00:00
2015-02-27 21:17:42 +00:00
2014-11-27 10:57:24 +00:00
2015-02-12 20:26:46 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-27 22:04:28 +00:00
2015-03-27 22:04:28 +00:00
2015-02-27 21:17:42 +00:00
2014-12-09 10:46:38 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-03-04 18:43:29 +00:00
2015-04-10 21:07:09 +00:00
2014-05-08 19:50:24 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-03-06 00:18:15 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2014-11-21 23:36:44 +00:00
2014-04-14 21:50:37 +00:00
2014-07-09 17:49:58 +00:00
2014-07-04 22:05:26 +00:00
2014-11-21 23:36:44 +00:00
2014-11-21 23:36:44 +00:00
2015-03-04 18:43:29 +00:00
2014-12-12 23:59:29 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2014-06-19 01:19:19 +00:00
2014-12-03 10:39:15 +00:00
2014-06-02 22:01:04 +00:00
2014-03-07 04:36:21 +00:00
2015-02-27 21:17:42 +00:00
2015-02-13 16:33:34 +00:00
2015-03-27 22:04:28 +00:00
2015-03-27 22:04:28 +00:00
2015-02-27 21:17:42 +00:00
2015-03-03 22:40:36 +00:00
2015-04-30 04:56:00 +00:00
2014-06-02 22:01:04 +00:00
2015-05-12 16:47:30 +00:00
2015-02-27 21:17:42 +00:00
2014-02-11 21:09:03 +00:00
2015-02-27 21:17:42 +00:00
2014-12-02 05:29:47 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-16 21:47:54 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-05-12 23:52:24 +00:00
2015-03-04 18:43:29 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-21 21:09:33 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 23:36:30 +00:00
2015-03-13 18:20:45 +00:00
2015-03-10 06:51:39 +00:00
2015-03-04 18:43:29 +00:00
2014-11-24 23:15:18 +00:00
2015-05-11 05:33:27 +00:00
2015-04-16 23:24:18 +00:00
2015-03-27 22:04:28 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-04-03 20:56:24 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-04-25 20:55:25 +00:00
2015-03-24 22:39:29 +00:00
2014-09-16 08:50:10 +00:00
2015-05-12 16:47:30 +00:00
2014-06-02 22:01:04 +00:00
2015-02-27 21:17:42 +00:00