Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/IndVarSimplify/udiv.ll @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | afa8332a0e37 |
children |
comparison
equal
deleted
inserted
replaced
101:34baf5011add | 120:1172e4bd9c6f |
---|---|
125 | 125 |
126 declare i32 @atoi(i8* nocapture) nounwind readonly | 126 declare i32 @atoi(i8* nocapture) nounwind readonly |
127 | 127 |
128 declare i32 @printf(i8* nocapture, ...) nounwind | 128 declare i32 @printf(i8* nocapture, ...) nounwind |
129 | 129 |
130 ; IndVars shouldn't be afraid to emit a udiv here, since there's a udiv in | 130 ; IndVars doesn't emit a udiv in for.body.preheader since SCEVExpander::expand will |
131 ; the original code. | 131 ; find out there's already a udiv in the original code. |
132 | 132 |
133 ; CHECK-LABEL: @foo( | 133 ; CHECK-LABEL: @foo( |
134 ; CHECK: for.body.preheader: | 134 ; CHECK: for.body.preheader: |
135 ; CHECK-NEXT: udiv | 135 ; CHECK-NOT: udiv |
136 | 136 |
137 define void @foo(double* %p, i64 %n) nounwind { | 137 define void @foo(double* %p, i64 %n) nounwind { |
138 entry: | 138 entry: |
139 %div0 = udiv i64 %n, 7 ; <i64> [#uses=1] | 139 %div0 = udiv i64 %n, 7 ; <i64> [#uses=1] |
140 %div1 = add i64 %div0, 1 | 140 %div1 = add i64 %div0, 1 |