]> granicus.if.org Git - llvm/commit
[GlobalISel] Import patterns containing SUBREG_TO_REG
authorJessica Paquette <jpaquette@apple.com>
Wed, 28 Aug 2019 20:12:31 +0000 (20:12 +0000)
committerJessica Paquette <jpaquette@apple.com>
Wed, 28 Aug 2019 20:12:31 +0000 (20:12 +0000)
commitc6ee9a1aeee8b7322b344bc4170ddcc030f1aa75
tree2a458107f8daedbf63735574234b539ccc4cac6d
parent37f2296ec9c8aa615937e7837c27037758b657e9
[GlobalISel] Import patterns containing SUBREG_TO_REG

Reuse the logic for INSERT_SUBREG to also import SUBREG_TO_REG patterns.

- Split `inferSuperRegisterClass` into two functions, one which tries to use
  an existing TreePatternNode (`inferSuperRegisterClassForNode`), and one that
  doesn't. SUBREG_TO_REG doesn't have a node to leverage, which is the cause
  for the split.

- Rename GlobalISelEmitterInsertSubreg.td to GlobalISelEmitterSubreg.td and
  update it.

- Update impacted tests in the AArch64 and X86 backends.

This is kind of a hit/miss for code size improvements/regressions. E.g. in
add-ext.ll, we now get some identity copies. This isn't really anything the
importer can handle, since it's caused by a later pass introducing the copy for
the sake of correctness.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370254 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
test/CodeGen/AArch64/GlobalISel/select-atomicrmw.mir
test/CodeGen/AArch64/GlobalISel/select-cmp.mir
test/CodeGen/AArch64/GlobalISel/select-cmpxchg.mir
test/CodeGen/AArch64/GlobalISel/select-imm.mir
test/CodeGen/AArch64/GlobalISel/select-scalar-shift-imm.mir
test/CodeGen/AArch64/GlobalISel/select.mir
test/CodeGen/AArch64/GlobalISel/swifterror.ll
test/CodeGen/AArch64/arm64-fast-isel-addr-offset.ll
test/CodeGen/X86/GlobalISel/add-ext.ll
test/CodeGen/X86/GlobalISel/select-ext-x86-64.mir
test/CodeGen/X86/GlobalISel/x86_64-select-zext.mir
test/TableGen/GlobalISelEmitterSubreg.td
utils/TableGen/GlobalISelEmitter.cpp