diff options
Diffstat (limited to 'test/Transforms/IndVarSimplify/preserve-gep-nested.ll')
-rw-r--r-- | test/Transforms/IndVarSimplify/preserve-gep-nested.ll | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/test/Transforms/IndVarSimplify/preserve-gep-nested.ll b/test/Transforms/IndVarSimplify/preserve-gep-nested.ll index b41de58..cdcaaa0 100644 --- a/test/Transforms/IndVarSimplify/preserve-gep-nested.ll +++ b/test/Transforms/IndVarSimplify/preserve-gep-nested.ll @@ -1,19 +1,20 @@ -; RUN: opt < %s -indvars -S > %t -; Exactly one getelementptr for each load+store. -; RUN: grep getelementptr %t | count 6 -; Each getelementptr using %struct.Q* %s as a base and not i8*. -; RUN: grep {getelementptr \[%\]struct\\.Q\\* \[%\]s,} %t | count 6 +; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s ; No explicit integer multiplications! -; RUN: not grep {= mul} %t ; No i8* arithmetic or pointer casting anywhere! -; RUN: not grep {i8\\*} %t -; RUN: not grep bitcast %t -; RUN: not grep inttoptr %t -; RUN: not grep ptrtoint %t +; CHECK-NOT: = {{= mul|i8\*|bitcast|inttoptr|ptrtoint}} +; Exactly one getelementptr for each load+store. +; Each getelementptr using %struct.Q* %s as a base and not i8*. +; CHECK: getelementptr %struct.Q* %s, +; CHECK: getelementptr %struct.Q* %s, +; CHECK: getelementptr %struct.Q* %s, +; CHECK: getelementptr %struct.Q* %s, +; CHECK: getelementptr %struct.Q* %s, +; CHECK: getelementptr %struct.Q* %s, +; CHECK-NOT: = {{= mul|i8\*|bitcast|inttoptr|ptrtoint}} ; FIXME: This test should pass with or without TargetData. Until opt ; supports running tests without targetdata, just hardware this in. -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n:32:64" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n32:64" %struct.Q = type { [10 x %struct.N] } %struct.N = type { %struct.S } |