mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
31123d4529
of operations that provably don't overflow. For example, we can prove %civ.inc below does not sign-overflow. With this change, IndVarSimplify changes %civ.inc to an add nsw. define i32 @foo(i32* %array, i32* %length_ptr, i32 %init) { entry: %length = load i32* %length_ptr, !range !0 %len.sub.1 = sub i32 %length, 1 %upper = icmp slt i32 %init, %len.sub.1 br i1 %upper, label %loop, label %exit loop: %civ = phi i32 [ %init, %entry ], [ %civ.inc, %latch ] %civ.inc = add i32 %civ, 1 %cmp = icmp slt i32 %civ.inc, %length br i1 %cmp, label %latch, label %break latch: store i32 0, i32* %array %check = icmp slt i32 %civ.inc, %len.sub.1 br i1 %check, label %loop, label %break break: ret i32 %civ.inc exit: ret i32 42 } Differential Revision: http://reviews.llvm.org/D6748 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225282 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
X86 | ||
xcore | ||
cycle.ll | ||
func-alias.ll | ||
ld1.ll | ||
lit.local.cfg | ||
loop1.ll | ||
mem-op-depth.ll | ||
metadata.ll | ||
no-ldstr-conn.ll | ||
req-depth.ll | ||
search-limit.ll | ||
simple3.ll | ||
simple-int.ll | ||
simple-ldstr-ptrs.ll | ||
simple-ldstr.ll | ||
simple-sel.ll | ||
simple-tst.ll | ||
simple.ll |