David Majnemer
4ee6f6446b
[SimplifyCFG] Don't mistake icmp of and for a tree of comparisons
...
SimplifyCFG tries to turn complex branch conditions into a switch.
Some of it's logic attempts to reason about bitwise arithmetic produced
by InstCombine. InstCombine can turn things like (X == 2) || (X == 3)
into (X & 1) == 2 and so SimplifyCFG tries to detect when this occurs so
that it can produce a switch instruction.
However, the legality checking was not sufficient to determine whether
or not this had occured. Correctly check this case by requiring that
the right-hand side of the comparison be a power of two.
This fixes PR26323.
llvm-svn: 258904
2016-01-27 02:43:28 +00:00
..
2015-10-30 23:13:18 +00:00
2015-11-19 19:53:05 +00:00
2015-11-19 05:56:52 +00:00
2015-11-05 22:03:56 +00:00
2015-12-16 00:49:36 +00:00
2015-11-22 00:16:24 +00:00
2015-06-17 20:52:32 +00:00
2015-12-03 19:41:25 +00:00
2015-06-17 20:52:32 +00:00
2016-01-15 09:20:19 +00:00
2015-04-16 23:24:18 +00:00
2015-09-11 03:22:04 +00:00
2015-12-09 21:21:07 +00:00
2015-11-19 05:56:52 +00:00
2016-01-25 23:35:03 +00:00
2015-12-23 09:58:36 +00:00
2016-01-16 12:15:53 +00:00
2016-01-03 17:22:03 +00:00
2015-07-13 14:18:22 +00:00
2015-12-09 21:08:18 +00:00
2015-12-27 08:13:45 +00:00
2016-01-08 10:55:52 +00:00
2016-01-12 17:53:59 +00:00
2016-01-21 17:04:42 +00:00
2015-09-11 03:22:04 +00:00
2016-01-22 21:18:20 +00:00
2016-01-21 21:32:35 +00:00
2016-01-19 20:53:51 +00:00
2016-01-06 04:53:16 +00:00
2016-01-20 02:15:15 +00:00
2016-01-26 16:17:24 +00:00
2016-01-21 18:55:54 +00:00
2015-09-11 03:22:04 +00:00
2016-01-07 21:36:16 +00:00
2016-01-10 07:13:33 +00:00
2015-12-18 18:12:35 +00:00
2016-01-04 23:16:22 +00:00
2015-11-09 13:26:09 +00:00
2016-01-26 02:27:47 +00:00
2015-04-23 04:51:44 +00:00
2015-11-09 13:26:09 +00:00
2016-01-25 19:43:45 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2016-01-26 00:35:07 +00:00
2016-01-11 22:39:43 +00:00
2015-12-12 05:38:55 +00:00
2016-01-25 10:17:11 +00:00
2015-12-21 22:14:04 +00:00
2015-10-30 23:28:12 +00:00
2015-06-17 20:52:32 +00:00
2015-11-22 00:16:24 +00:00
2015-12-11 13:36:59 +00:00
2016-01-06 23:50:22 +00:00
2015-12-14 18:34:23 +00:00
2015-11-19 05:56:52 +00:00
2015-12-18 21:36:30 +00:00
2015-11-19 05:56:52 +00:00
2016-01-21 18:11:44 +00:00
2015-06-17 20:52:32 +00:00
2016-01-22 21:02:55 +00:00
2016-01-23 06:00:44 +00:00
2016-01-26 18:42:36 +00:00
2015-06-17 20:52:32 +00:00
2016-01-20 19:50:25 +00:00
2015-12-22 00:13:11 +00:00
2015-11-27 23:14:51 +00:00
2015-11-05 22:03:56 +00:00
2015-11-19 05:56:52 +00:00
2015-09-11 03:22:04 +00:00
2015-08-14 02:02:05 +00:00
2016-01-27 02:43:28 +00:00
2015-12-12 05:38:55 +00:00
2016-01-26 15:45:49 +00:00
2015-05-15 17:54:48 +00:00
2016-01-14 20:06:34 +00:00
2015-08-13 18:48:49 +00:00
2015-10-30 23:28:12 +00:00
2015-11-05 22:03:56 +00:00
2016-01-23 05:42:49 +00:00
2016-01-17 12:35:29 +00:00
2015-04-16 23:24:18 +00:00
2016-01-14 19:12:27 +00:00