[all-commits] [llvm/llvm-project] 4d4181: [AArch64][GlobalISel] Don't match thread-local glo...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Apr 28 13:48:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d41810cf6798da7541a512e291b7c568db9ed8b
      https://github.com/llvm/llvm-project/commit/4d41810cf6798da7541a512e291b7c568db9ed8b
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2021-04-28 (Wed, 28 Apr 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/fold-global-offsets.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Don't match thread-local globals in matchFoldGlobalOffset

SelectionDAG has separate ISD opcodes for regular global values and thread-local
global values, while GlobalISel does not.

This combine was ported from SDAG directly without knowing that. As a result,
it was running on TLS globals.

This makes it so that `matchFoldGlobalOffset` doesn't match on TLS globals, and
adds an assert to `selectTLSGlobalValue` to make sure that TLS globals never
have offsets.

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




More information about the All-commits mailing list