[all-commits] [llvm/llvm-project] 2a7e75: [GlobalISel] Handle non-multiples of the base type...

Justin Bogner via All-commits all-commits at lists.llvm.org
Tue Jun 8 10:14:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a7e759734982bea1d08642332a92f687266148f
      https://github.com/llvm/llvm-project/commit/2a7e759734982bea1d08642332a92f687266148f
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir

  Log Message:
  -----------
  [GlobalISel] Handle non-multiples of the base type in narrowScalarInsert

When narrowing G_INSERT, handle types that aren't a multiple of the
type we're narrowing to. This comes up if we're narrowing something
like an s96 to fit in 64 bit registers and also for non-byte multiple
packed types if they come up.

This implementation handles these cases by extending the extra bits to
the narrow size and truncating the result back to the destination
size.

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


  Commit: 4271e1d2c52271ddb9544fa0c76543bffe053937
      https://github.com/llvm/llvm-project/commit/4271e1d2c52271ddb9544fa0c76543bffe053937
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-add.mir

  Log Message:
  -----------
  [GlobalISel] Handle non-multiples of the base type in narrowScalarAddSub

When narrowing G_ADD and G_SUB, handle types that aren't a multiple of
the type we're narrowing to. This allows us to handle types like s96
on 64 bit targets.

Note that the test here has a couple of dead instructions because of
the way the setup legalizes. I wasn't able to come up with a way to
write this test that avoids that easily.

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


Compare: https://github.com/llvm/llvm-project/compare/30bb5dcb0a5c...4271e1d2c522


More information about the All-commits mailing list