if (info.m_ranges[i].exp == NULL_TREE
|| !INTEGRAL_TYPE_P (TREE_TYPE (info.m_ranges[i].exp))
|| info.m_ranges[i].low == NULL_TREE
- || info.m_ranges[i].high == NULL_TREE)
+ || info.m_ranges[i].high == NULL_TREE
+ || (TYPE_PRECISION (TREE_TYPE (info.m_ranges[i].low))
+ != TYPE_PRECISION (TREE_TYPE (info.m_ranges[i].high))))
return;
for (unsigned i = 1; i < info.m_ranges.length (); ++i)
}
chain->m_entries.reverse ();
- if (chain->m_entries.length () >= 3
+ if (chain->m_entries.length () >= 2
&& chain->check_non_overlapping_cases ()
&& chain->is_beneficial ())
{
--- /dev/null
+/* PR tree-optimization/88702 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */
+
+int IsHTMLWhitespace(int aChar) {
+ return aChar == 0x0009 || aChar == 0x000A ||
+ aChar == 0x000C || aChar == 0x000D ||
+ aChar == 0x0020;
+}
+
+/* { dg-final { scan-tree-dump "Condition chain with \[^\n\r]\* BBs transformed into a switch statement." "iftoswitch" } } */