mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix ScalarEvolution's backedge-taken count computations to check for
overflow when computing a integer division to round up. Thanks to Nick Lewycky for noticing this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -loop-deletion | llvm-dis | grep phi | count 1
|
||||
; XFAIL: *
|
||||
|
||||
; Indvars should be able to evaluate this loop, allowing loop deletion
|
||||
; to delete it.
|
||||
; Indvars can't evaluate this loop, because ScalarEvolution can't compute
|
||||
; an exact trip count, because it doesn't know if dividing by the stride will
|
||||
; have a remainder. It could be done with more aggressive VRP though.
|
||||
|
||||
define i32 @test(i32 %x_offs) nounwind readnone {
|
||||
entry:
|
||||
|
||||
Reference in New Issue
Block a user