[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 20 14:14:41 PDT 2017


davidxl updated this revision to Diff 116069.
davidxl added a comment.

Addressed review feedback.

In this version, more strict check is added such that int phis that feeds inttoptr whose result is actually used by load/store/getelemenptr operations are considered from this instruction combining. This is strictly not necessary for this particular transformation, but there is a concern that some latent bug may be exposed if not done.

Also added a negative test case.


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.116069.patch
Type: text/x-patch
Size: 21439 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170920/faf065a5/attachment.bin>


More information about the llvm-commits mailing list