[llvm-commits] [llvm] r145364 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Andrew Trick
atrick at apple.com
Mon Nov 28 18:06:35 PST 2011
Author: atrick
Date: Mon Nov 28 20:06:35 2011
New Revision: 145364
URL: http://llvm.org/viewvc/llvm-project?rev=145364&view=rev
Log:
Make SCEV print <nsw><nuw> for Add/MulExpr.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=145364&r1=145363&r2=145364&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Nov 28 20:06:35 2011
@@ -188,6 +188,14 @@
OS << OpStr;
}
OS << ")";
+ switch (NAry->getSCEVType()) {
+ case scAddExpr:
+ case scMulExpr:
+ if (NAry->getNoWrapFlags(FlagNUW))
+ OS << "<nuw>";
+ if (NAry->getNoWrapFlags(FlagNSW))
+ OS << "<nsw>";
+ }
return;
}
case scUDivExpr: {
More information about the llvm-commits
mailing list