[PATCH] D64432: [InstCombine] try to narrow a truncated load

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 13:00:44 PDT 2019


jdoerfert accepted this revision.
jdoerfert added a comment.

One final request, otherwise LGTM.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:715
+  LoadInst *NarrowLoad = new LoadInst(Trunc.getDestTy(), Bitcast);
+  NarrowLoad->setAlignment(WideLoad->getAlignment());
+  return NarrowLoad;
----------------
I think you need to copy over more information (probably there is code for that somewhere):
 - `!nontemporal !<index>`
 - `!invariant.load !<index>`
 - `!invariant.group !<index>`



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64432/new/

https://reviews.llvm.org/D64432





More information about the llvm-commits mailing list