]> granicus.if.org Git - llvm/commit
[InstructionSimplify] Apply sext/trunc after pointer stripping
authorMichael Liao <michael.hliao@gmail.com>
Tue, 16 Jul 2019 01:03:06 +0000 (01:03 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Tue, 16 Jul 2019 01:03:06 +0000 (01:03 +0000)
commitdfcb352e376f71ce468277597d70f7dd83e63525
tree1646f4b83139335477e5e0141e85a4bb5729a676
parent364e3e04c7e196b5a92d1c06410c882e621ef4b0
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366162 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/compare.ll