HomePhabricator

[InstructionSimplify] Apply sext/trunc after pointer stripping

Description

[InstructionSimplify] Apply sext/trunc after pointer stripping

Summary:

  • As the pointer stripping could trace through addrspacecast now, need to sext/trunc the offset to ensure it has the same width as the pointer after stripping.

Reviewers: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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