llvm-6502/lib
Sanjoy Das 0afc9b33fe Bugfix: SCEV incorrectly marks certain expressions as nsw
I could not come up with a test case for this one; but I don't think
`getPreStartForSignExtend` can assume `AR` is `nsw` -- there is one
place in scalar evolution that calls `getSignExtendAddRecStart(AR,
...)` without proving that `AR` is `nsw`

(line 1564)

   OperandExtendedAdd =
     getAddExpr(WideStart,
                getMulExpr(WideMaxBECount,
                           getZeroExtendExpr(Step, WideTy)));
   if (SAdd == OperandExtendedAdd) {
     // If AR wraps around then
     //
     //    abs(Step) * MaxBECount > unsigned-max(AR->getType())
     // => SAdd != OperandExtendedAdd
     //
     // Thus (AR is not NW => SAdd != OperandExtendedAdd) <=>
     // (SAdd == OperandExtendedAdd => AR is NW)

     const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW);

     // Return the expression with the addrec on the outside.
     return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this),
                          getZeroExtendExpr(Step, Ty),
                          L, AR->getNoWrapFlags());
   }

Differential Revision: http://reviews.llvm.org/D7640



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229594 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18 00:43:19 +00:00
..
Analysis Bugfix: SCEV incorrectly marks certain expressions as nsw 2015-02-18 00:43:19 +00:00
AsmParser AsmParser: extractvalue requires at least one index operand 2015-02-16 09:18:13 +00:00
Bitcode Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
CodeGen Twines should be passed by const ref. 2015-02-17 23:44:22 +00:00
DebugInfo llvm-pdbdump: Add flags controlling the type of values to dump. 2015-02-15 20:27:53 +00:00
ExecutionEngine Don't deference the section_end() iterator. 2015-02-17 20:07:28 +00:00
Fuzzer
IR IR: fieldIsMDNode() should be false for MDString 2015-02-17 22:34:15 +00:00
IRReader
LineEditor
Linker Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
LTO
MC Add r228980 back. 2015-02-17 20:48:01 +00:00
Object [Object] Support reading 64-bit MIPS ELF archives 2015-02-17 18:54:22 +00:00
Option Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
ProfileData Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
Support Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
TableGen MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC. 2015-02-16 19:33:36 +00:00
Target [X86][FastIsel] Teach how to select scalar integer to float/double conversions. 2015-02-17 23:40:58 +00:00
Transforms Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile