On 12/16/2016 12:49 PM, Marek Polacek wrote:

But as this testcase shows, this breaks when the default label shares a label
with another case.  On this testcase, when we reach the switch, we know that
argc is either 1, 2, or 3.  So by the time we reach vrp2, the IR will have
been optimized to

  switch (argc) {
    default:
    case 3:
      // argc will be considered 1 despite the case 3
      break;
    case 2:
      ...
   }

Shouldn't we just remove the "case 3:" from the switch in this case? Would that fix things?


Bernd

Reply via email to