[PATCH] D16226: Push isDereferenceableAndAlignedPointer down into isSafeToLoadUnconditionally

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 08:34:35 PST 2016


apilipenko created this revision.
apilipenko added reviewers: hfinkel, reames.
apilipenko added a subscriber: llvm-commits.

Separated from D10920.

isSafeToLoadUnconditionally must take alignment into account. There are tests which check this behavior. That's why isDereferenceableAndAlignedPointer must be used instead of isDereferenceablePointer.

As a side effect optimizations which use isSafeToLoadUnconditionally will benefit from dereferenceable attribute. Corresponding test cases added.

http://reviews.llvm.org/D16226

Files:
  lib/Analysis/Loads.cpp
  lib/Transforms/Scalar/SROA.cpp
  lib/Transforms/Scalar/ScalarReplAggregates.cpp
  test/Transforms/InstCombine/select.ll
  test/Transforms/TailCallElim/reorder_load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16226.44993.patch
Type: text/x-patch
Size: 5851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160115/03df4b77/attachment.bin>


More information about the llvm-commits mailing list