[all-commits] [llvm/llvm-project] e790d3: [OpaquePtr] Handle addrspacecasts in InstCombine

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 22 08:45:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e790d3667ed4d8f8df0b55f7c93fee0045c0e626
      https://github.com/llvm/llvm-project/commit/e790d3667ed4d8f8df0b55f7c93fee0045c0e626
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M llvm/include/llvm/IR/DerivedTypes.h
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/opaque-ptr.ll

  Log Message:
  -----------
  [OpaquePtr] Handle addrspacecasts in InstCombine

This adds support for addrspace casts involving opaque pointers to
InstCombine, as well as the isEliminableCastPair() helper
(otherwise the assertion failure would just move there).

Add PointerType::hasSameElementTypeAs() to hide the element type
details.

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




More information about the All-commits mailing list