llvm-6502/lib
Sanjoy Das 8d16a81c33 Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap
When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.

This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.

Apart from the attached test case, another (more realistic) manifestation
of the bug can be seen in Transforms/IndVarSimplify/pr20680.ll.

NOTE: this change was landed with an incorrect commit message in
rL230275 and was reverted for that reason in rL230279.  This commit
message is the correct one.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230280 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 23:22:58 +00:00
..
Analysis Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap 2015-02-23 23:22:58 +00:00
AsmParser AsmParser: Check ConstantExpr insertvalue operands for type correctness 2015-02-23 07:13:52 +00:00
Bitcode Use common parse routine to read alignment values from bitcode 2015-02-22 19:32:03 +00:00
CodeGen Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type. 2015-02-23 23:04:28 +00:00
DebugInfo Revert "Revert "Raising minimum required CMake version to 2.8.12.2."" 2015-02-23 19:34:04 +00:00
ExecutionEngine Revert "Revert "Raising minimum required CMake version to 2.8.12.2."" 2015-02-23 19:34:04 +00:00
Fuzzer [fuzzer] one more experimental search mode: -use_coverage_pairs=1 2015-02-20 03:02:37 +00:00
IR Fix invalid cast. 2015-02-23 21:51:06 +00:00
IRReader
LineEditor
Linker
LTO
MC COFF: Add 'IMAGE_SCN_CNT_INITIALIZED_DATA' to all DWARF sections 2015-02-22 02:35:27 +00:00
Object [obj2yaml/yaml2obj] Add SHT_GROUP support. 2015-02-21 04:28:26 +00:00
Option
ProfileData Disallow implicit conversions from None to integer types 2015-02-20 07:28:28 +00:00
Support Sync the __builtin_expects for our 3 quadratically probed hash table implementations. 2015-02-23 16:41:36 +00:00
TableGen
Target X86: Use a smaller 'mov' instruction for stack probe calls 2015-02-23 21:50:30 +00:00
Transforms add newline for easier reading; NFC 2015-02-23 21:32:09 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile