diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-02-18 13:48:15 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-02-18 13:48:15 +0000 |
commit | 9ac438062906eff96a8f2cf1dd61dd630645717a (patch) | |
tree | 755ab1749a5a7d01079f0b13cf76162bc508d46d /test/OpenMP/for_lastprivate_codegen.cpp | |
parent | 19b977bcdf62a9f6fca2c115fd85d2508f4a818b (diff) |
[OPENMP] Fix codegen for lastprivate loop counters.
Patch fixes bug with codegen for lastprivate loop counters. Also it may
improve performance for lastprivates calculations in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_lastprivate_codegen.cpp')
-rw-r--r-- | test/OpenMP/for_lastprivate_codegen.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/OpenMP/for_lastprivate_codegen.cpp b/test/OpenMP/for_lastprivate_codegen.cpp index 36abd8df07..ea559b08ea 100644 --- a/test/OpenMP/for_lastprivate_codegen.cpp +++ b/test/OpenMP/for_lastprivate_codegen.cpp @@ -396,20 +396,9 @@ int main() { // CHECK: br i1 [[IS_LAST_ITER:%.+]], label %[[LAST_THEN:.+]], label %[[LAST_DONE:.+]] // CHECK: [[LAST_THEN]] -// Calculate last iter count -// CHECK: store i32 1, i32* [[OMP_IV]] -// CHECK: [[IV1_1:%.+]] = load i32, i32* [[OMP_IV]] -// CHECK-NEXT: [[CALC_I_2:%.+]] = add nsw i32 [[IV1_1]], 1 -// CHECK-NEXT: store i32 [[CALC_I_2]], i32* [[OMP_IV]] -// Actual copying. - -// original cnt=private_cnt; // Calculate private cnt value. -// CHECK: [[IV1_1:%.+]] = load i32, i32* [[OMP_IV]] -// CHECK: [[MUL:%.+]] = mul nsw i32 [[IV1_1]], 1 -// CHECK: [[ADD:%.+]] = add nsw i32 0, [[MUL]] -// CHECK: [[CONV:%.+]] = trunc i32 [[ADD]] to i8 -// CHECK: store i8 [[CONV]], i8* [[CNT_PRIV]] +// CHECK: store i8 2, i8* [[CNT_PRIV]] +// original cnt=private_cnt; // CHECK: [[CNT_VAL:%.+]] = load i8, i8* [[CNT_PRIV]], // CHECK: store i8 [[CNT_VAL]], i8* [[CNT]], |