[PATCH] D37460: [GVN] Prevent LoadPRE from hoisting through guards and assumes

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 03:08:11 PDT 2017


mkazantsev created this revision.

This patch fixes the miscompile that happens when PRE hoists loads through guards
and assumes. Such transformation is basically incorrect: everything that is defined under
a guard/assume should stay there. We prohibit LoadPRE for this case.


https://reviews.llvm.org/D37460

Files:
  lib/Transforms/Scalar/GVN.cpp
  test/Transforms/GVN/PRE/pre-load-guards.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37460.113817.patch
Type: text/x-patch
Size: 6354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170905/191d138e/attachment.bin>


More information about the llvm-commits mailing list