[all-commits] [llvm/llvm-project] 6f8016: Pre-commit test showing bug #80287

ostannard via All-commits all-commits at lists.llvm.org
Sat Mar 23 15:36:36 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f8016fda7d56013a26d6f9bf2bd157aff4b13fa
      https://github.com/llvm/llvm-project/commit/6f8016fda7d56013a26d6f9bf2bd157aff4b13fa
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2024-03-23 (Sat, 23 Mar 2024)

  Changed paths:
    A llvm/test/CodeGen/ARM/ldst-opt-lr-restored.ll

  Log Message:
  -----------
  Pre-commit test showing bug #80287

This test shows the bug where LR is used as a general-purpose register
on a code path where it is not spilled to the stack.

(cherry picked from commit 8779cf68e80dcc0b15e8034f39e6ce18b08352b6)


  Commit: 0e16af8e4cf3a66ad5d078d52744ae2776f9c4b2
      https://github.com/llvm/llvm-project/commit/0e16af8e4cf3a66ad5d078d52744ae2776f9c4b2
  Author: ostannard <oliver.stannard at arm.com>
  Date:   2024-03-23 (Sat, 23 Mar 2024)

  Changed paths:
    M llvm/lib/Target/ARM/ARMFrameLowering.cpp
    M llvm/lib/Target/ARM/ARMFrameLowering.h
    M llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
    M llvm/test/CodeGen/ARM/ldst-opt-lr-restored.ll

  Log Message:
  -----------
  [ARM] Update IsRestored for LR based on all returns (#82745)

PR #75527 fixed ARMFrameLowering to set the IsRestored flag for LR based
on all of the return instructions in the function, not just one.
However, there is also code in ARMLoadStoreOptimizer which changes
return instructions, but it set IsRestored based on the one instruction
it changed, not the whole function.

The fix is to factor out the code added in #75527, and also call it from
ARMLoadStoreOptimizer if it made a change to return instructions.

Fixes #80287.

(cherry picked from commit 749384c08e042739342c88b521c8ba5dac1b9276)


Compare: https://github.com/llvm/llvm-project/compare/ef6d1ec07c69...0e16af8e4cf3

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list