[PATCH] [InstCombine] Fold endian-independent load sequence into a single load.

Ahmed Bougacha ahmed.bougacha at gmail.com
Wed Oct 22 11:58:47 PDT 2014


Keep the alignment from the first byte load instruction.
Also, refactor the ByteLoads handling to make it endian-independent (from a memory standpoint).

The previous patch relied on the later InstCombines to set the alignment, but we can also do it here. I didn't do that from the beginning because I couldn't think of a case where that's possible but the later InstCombine isn't. I still can't, but that's no reason not to do it here!

http://reviews.llvm.org/D5898

Files:
  lib/Transforms/InstCombine/InstCombine.h
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  test/Transforms/InstCombine/endian-independent-load-BE.ll
  test/Transforms/InstCombine/endian-independent-load-LE-aliasing.ll
  test/Transforms/InstCombine/endian-independent-load-LE.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5898.15266.patch
Type: text/x-patch
Size: 29664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141022/62b17201/attachment.bin>


More information about the llvm-commits mailing list