[all-commits] [llvm/llvm-project] ae983d: [InferAddressSpaces] NFC: For noop IntToPtr/PtrToI...

Reshabh Sharma via All-commits all-commits at lists.llvm.org
Mon Jun 28 06:54:58 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae983de6cce23dfeeb629395f86528e911218ba4
      https://github.com/llvm/llvm-project/commit/ae983de6cce23dfeeb629395f86528e911218ba4
  Author: Reshabh Sharma <Reshabhkumar.Sharma at amd.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
    M llvm/test/Transforms/InferAddressSpaces/AMDGPU/noop-ptrint-pair.ll

  Log Message:
  -----------
  [InferAddressSpaces] NFC: For noop IntToPtr/PtrToInt pair cast to operator instead of PtrToInt

Compiler crashes at an assertion while casting operands to PtrToIntInst at some cases when
ptrtoint is present as an explicit operand to inttoptr. Explicit instruction operator as
operand can not be casted to an Instruction.

This patch replaces cast from PtrToInst to Operator which are later checked for constant
expressions.

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




More information about the All-commits mailing list