[PATCH] D141712: [GVN] Improve PRE on load instructions

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 20:10:33 PST 2023


Carrot updated this revision to Diff 494499.
Carrot added a comment.
Herald added a subscriber: ormris.

Check for implicit control flow instruction in function findLoadToHoistIntoPred, so we can avoid moving load across unexpected control flow.

@reames and @hans please try to see if this patch works for your code.


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

https://reviews.llvm.org/D141712

Files:
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
  llvm/test/Transforms/GVN/PRE/2017-06-28-pre-load-dbgloc.ll
  llvm/test/Transforms/GVN/PRE/2018-06-08-pre-load-dbgloc-no-null-opt.ll
  llvm/test/Transforms/GVN/PRE/pre-load-dbg.ll
  llvm/test/Transforms/GVN/PRE/pre-load.ll
  llvm/test/Transforms/GVN/PRE/volatile.ll
  llvm/test/Transforms/GVN/condprop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141712.494499.patch
Type: text/x-patch
Size: 35986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230203/3ef949ad/attachment.bin>


More information about the llvm-commits mailing list