[PATCH] D33257: [JumpThreading] Dont RAUW condition if guards in block
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 14:06:26 PDT 2017
anna created this revision.
We should not RAUW the condition if experimental.guard [1] is a use of that
condition. This is because LazyValueInfo may have used the guard to identify the
value of the condition. We cannot apply the value back to the guard and change
the behaviour of the guard. For example, by RAUWing and replacing the guard use,
we may change a guard from:
guard(false) to guard(true). This changes the guard behaviour from `always
deoptimizing` to `sometimes deoptimizing`, and incorrectly affects the program semantics.
[1] http://llvm.org/docs/LangRef.html#llvm-experimental-guard-intrinsic
https://reviews.llvm.org/D33257
Files:
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/guards.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33257.99193.patch
Type: text/x-patch
Size: 4902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170516/c0d3d400/attachment.bin>
More information about the llvm-commits
mailing list