Convert -indvars tests that rely on SCEV expansion to -loop-reduce tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2012-03-22 17:10:07 +00:00
parent f6399a65f0
commit 0c0a3effde
2 changed files with 9 additions and 5 deletions

View File

@ -1,13 +1,17 @@
; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s
; CHECK: getelementptr
; CHECK: mul {{.*}}, 37
; CHECK: add {{.*}}, 5203
; RUN: opt < %s -loop-reduce -S | FileCheck %s
; CHECK: bb1:
; CHECK: load double* [[IV:%[^,]+]]
; CHECK: store double {{.*}}, double* [[IV]]
; CHECK: getelementptr double*
; CHECK-NOT: cast
; CHECK: br {{.*}} label %bb1
; This test tests several things. The load and store should use the
; same address instead of having it computed twice, and SCEVExpander should
; be able to reconstruct the full getelementptr, despite it having a few
; obstacles set in its way.
; We only check that the inner loop (bb1-bb2) is "reduced" because LSR
; currently only operates on inner loops.
target datalayout = "e-p:64:64:64-n32:64"

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s
; RUN: opt < %s -loop-reduce -S | FileCheck %s
; CHECK-NOT: {{inttoptr|ptrtoint}}
; CHECK: scevgep
; CHECK-NOT: {{inttoptr|ptrtoint}}