[llvm] r280364 - [SimplifyCFG] Handle tail-sinking of more than 2 incoming branches

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 18:33:55 PST 2017


On Thu, Sep 01, 2016 at 12:58:14PM -0000, James Molloy via llvm-commits wrote:
> Author: jamesm
> Date: Thu Sep  1 07:58:13 2016
> New Revision: 280364
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=280364&view=rev
> Log:
> [SimplifyCFG] Handle tail-sinking of more than 2 incoming branches

Hello James,
this change introduces a regression from 3.9->4.0 breaking Xen kernel builds.
Test case is attached. The original code has an always_inline attribute,
but that's not relevant here. The difference is that before, the default
branch would have been eliminated and now it remains.

Joerg
-------------- next part --------------
a;
static xsm_default_action(p1) {
  switch (p1) {
  case 0:
    return 0;
  case 2:
    return 1;
  default:
    __xsm_action_mismatch_detected();
  }
}
xsm_pmu_op() {
  switch (a) {
  case 2:
    return xsm_default_action(2);
  case 5:
  case 6:
  case 7:
    return xsm_default_action(0);
  }
}


More information about the llvm-commits mailing list