[all-commits] [llvm/llvm-project] 95daba: [AArch64][GlobalISel] Make G_PTRTOINT only legal f...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Sep 28 16:22:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95dabac7a5adf62af5c43863e7bf6db5d4437b72
      https://github.com/llvm/llvm-project/commit/95dabac7a5adf62af5c43863e7bf6db5d4437b72
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-ptrtoint.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-int-ptr-casts.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Make G_PTRTOINT only legal for s64 + p0

A few issues:

  1. There was no legalizer test for G_PTRTOINT
  2. Same clamping issue as in many other opcodes
  3. AArch64 pointers can only be 64b, so in reality we always have to trunc or
     extend with any size other than p0 anyway.

This seems to actually produce more correct selection for narrow types as well.

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




More information about the All-commits mailing list