https://bugs.llvm.org/show_bug.cgi?id=39357

            Bug ID: 39357
           Summary: HotColdSplitting: Miscompile in
                    /SingleSource/Benchmarks/BenchmarkGame/recursive
                    (arm64, -Os)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: v...@apple.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 21019
  --> https://bugs.llvm.org/attachment.cgi?id=21019&action=edit
IR immediately before HotColdSplitting (-Os -g)

When compiled with -Os, this test produces the correct output on an arm64
device with a 1008KB stack size limit.

When -hot-cold-split=true is enabled, the test program overflows its stack.

Here's the relevant function:

int ack(int x, int y) {
  if (x == 0) {
    return y + 1;
  }

  return ack(x - 1, ((y | 0) ? ack(x, y - 1) : 1));
}

I've attached the IR from immediately before HotColdSplitting and immediately
after. Even though none of the blocks in the ack() function should be
identified as cold, the hot path of the function is marked cold and outlined.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to