[all-commits] [llvm/llvm-project] 494680: [ARM] Fix so immediates and pc relative checks

simonwallis2 via All-commits all-commits at lists.llvm.org
Mon Sep 14 00:58:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4946802c5f406b050cbb1524d0fd03cf3fd7b0dc
      https://github.com/llvm/llvm-project/commit/4946802c5f406b050cbb1524d0fd03cf3fd7b0dc
  Author: Simon Wallis <simon.wallis2 at arm.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
    A llvm/test/CodeGen/ARM/constant-island-SOImm-limit16.mir

  Log Message:
  -----------
  [ARM] Fix so immediates and pc relative checks

Treating an SoImm offset as a multiple of 4 between -1020 and 1020
mis-handles the second of a pair of 16-bit constants where the offset is a multiple of 2 but not a multiple of 4,
leading to an LLVM ERROR: out of range pc-relative fixup value

For 32-bit and larger (64-bit) constants, continue to treat an SoImm offset as a multiple of 4 between -1020 and 1020.
For smaller (16-bit) constants, treat an SoImm offset as a multiple of 1 between -255 and 255.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86949




More information about the All-commits mailing list