[all-commits] [llvm/llvm-project] 2144a3: [GISel] Add combiners for G_INTTOPTR and G_PTRTOINT

proaditya via All-commits all-commits at lists.llvm.org
Fri Jul 31 10:14:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2144a3bdbba40f0a78d30921088e2c8407ff9dd2
      https://github.com/llvm/llvm-project/commit/2144a3bdbba40f0a78d30921088e2c8407ff9dd2
  Author: Aditya Nandakumar <aditya_nandakumar at apple.com>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
    M llvm/include/llvm/Target/GlobalISel/Combine.td
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-inttoptr-ptrtoint.mir
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-ptrtoint.mir

  Log Message:
  -----------
  [GISel] Add combiners for G_INTTOPTR and G_PTRTOINT

https://reviews.llvm.org/D84909

Patch adds two new GICombinerRules, one for G_INTTOPTR and one for
G_PTRTOINT. The G_INTTOPTR elides ptr2int(int2ptr(x)) to a copy of x, if
the cast is within the same address space. The G_PTRTOINT elides
int2ptr(ptr2int(x)) to a copy of x. Patch additionally adds new combiner
tests for the AArch64 target to test these new combiner rules.

Patch by mkitzan




More information about the All-commits mailing list