[LLVMbugs] [Bug 23527] New: [ScalarEvolution] createNodeForGEP over-optimistic about preserving nsw
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 14 12:04:39 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23527
Bug ID: 23527
Summary: [ScalarEvolution] createNodeForGEP over-optimistic
about preserving nsw
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: wujingyue at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
[Copied from llvmdev@]
I was looking at ScalarEvolution::createNodeForGEP
(http://llvm.org/docs/doxygen/html/ScalarEvolution_8cpp_source.html#l03702),
and noticed that the code that applies nsw flags to the resultant SCEV is
inconsistent with the comment.
While the comment says
03709 // Don't blindly transfer the inbounds flag from the GEP instruction to
the
03710 // Add expression, because the Instruction may be guarded by control
flow
03711 // and the no-overflow bits may not be valid for the expression in any
03712 // context.
03713 SCEV::NoWrapFlags Wrap = GEP->isInBounds() ? SCEV::FlagNSW :
SCEV::FlagAnyWrap;
the code still transfers nsw to LocalOffset and BaseS+TotalOffset.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150514/01526dea/attachment.html>
More information about the llvm-bugs
mailing list