HomePhabricator

[InstructionSimplify] Apply sext/trunc after pointer stripping

Authored by hliao on Jul 15 2019, 6:03 PM.

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

llvm-svn: 366162