[PATCH] IndVarSimplify: Don't let LFTR compare against a poison value
David Majnemer
david.majnemer at gmail.com
Wed Sep 3 10:02:41 PDT 2014
Hi chandlerc, nicholas, nlewycky, atrick,
LinearFunctionTestReplace tries to use the *next* indvar to compare
against when possible. However, it may be the case that the calculation
for the next indvar has NUW/NSW flags and that it may only be safely
used inside the loop. Using it in a comparison to calculate the exit
condition could result in observing poison.
This fixes PR20680.
http://reviews.llvm.org/D5174
Files:
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
test/Transforms/IndVarSimplify/lftr-address-space-pointers.ll
test/Transforms/IndVarSimplify/lftr-extend-const.ll
test/Transforms/IndVarSimplify/lftr-reuse.ll
test/Transforms/IndVarSimplify/pr20680.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5174.13216.patch
Type: text/x-patch
Size: 16692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140903/8442dc52/attachment.bin>
More information about the llvm-commits
mailing list