[PATCH] D14483: Destructor loads of struct that do not contains padding in InstCombine.

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 7 18:35:04 PST 2015


deadalnix created this revision.
deadalnix added reviewers: chandlerc, joker.eph, pete, majnemer, reames.
deadalnix added a subscriber: llvm-commits.

For non padded structs, we can just proceed and deaggregate them. We don't want ot do this when there is padding in the struct as to not lose information about this padding (the subsequents passes would then try hard to preserve the padding, which is undesirable).

Also update extractvalue.ll and cast.ll so that they use structs with padding.

Remove the FIXME in the extractvalue of laod case as the non padded case is handled when processing the load, and we don't want to do it on the padded case.

http://reviews.llvm.org/D14483

Files:
  include/llvm/IR/DataLayout.h
  lib/IR/DataLayout.cpp
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
  test/Transforms/InstCombine/cast.ll
  test/Transforms/InstCombine/extractvalue.ll
  test/Transforms/InstCombine/unpack-fca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14483.39646.patch
Type: text/x-patch
Size: 17476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151108/78909f37/attachment.bin>


More information about the llvm-commits mailing list