[PATCH] [InstCombine] Fold IntToPtr and PtrToInt into preceding loads.

Philip Pfaffe philip.pfaffe at gmail.com
Tue Apr 21 07:32:40 PDT 2015


Hi majnemer, chandlerc,

Currently we only fold a BitCast into a Load when the BitCast is its only user. This patch enables doing the same for IntToPtr and PtrToInt in the case they are noops.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9152

Files:
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  test/Transforms/InstCombine/load-bitcast32.ll
  test/Transforms/InstCombine/load-bitcast64.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9152.24132.patch
Type: text/x-patch
Size: 4368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150421/287348c5/attachment.bin>


More information about the llvm-commits mailing list