[PATCH] D37832: Eliminate PHI (int typed) which is only used by inttoptr

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 16:17:11 PDT 2017


davidxl created this revision.

SCEV  (and AA) has trouble understanding inttoptr/ptrtoint instructions and thus produces conservative analysis results, which blocks transformations such as loop vectorizer.  See https://reviews.llvm.org/D37419 for background.

Instead of teaching SCEV to see through those bitcast operations, this patch improves instcombiner to eliminate those operations when possible.


https://reviews.llvm.org/D37832

Files:
  lib/Transforms/InstCombine/InstCombineInternal.h
  lib/Transforms/InstCombine/InstCombinePHI.cpp
  test/Transforms/InstCombine/intptr1.ll
  test/Transforms/InstCombine/intptr2.ll
  test/Transforms/InstCombine/intptr3.ll
  test/Transforms/InstCombine/intptr4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37832.115133.patch
Type: text/x-patch
Size: 19435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170913/e1f398c3/attachment-0001.bin>


More information about the llvm-commits mailing list