diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-01-29 18:51:58 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-01-29 18:51:58 +0000 |
commit | 316ccf60c9094d0b6c32761526782bd407bc3099 (patch) | |
tree | bd62fce6080334a84add8f6b3eb8e0b7b51c792c /clang/test/OpenMP/ordered_codegen.cpp | |
parent | db9152c248d242ff89c62bc350250e8064f229ed (diff) | |
download | bcm5719-llvm-316ccf60c9094d0b6c32761526782bd407bc3099.tar.gz bcm5719-llvm-316ccf60c9094d0b6c32761526782bd407bc3099.zip |
[OPENMP]Make the loop with unsigned counter countable.
According to the report, better to keep the original strict compare
operation as the loop condition with unsigned loop counters to make the
loop countable. This allows further loop transformations.
llvm-svn: 352526
Diffstat (limited to 'clang/test/OpenMP/ordered_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/ordered_codegen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/OpenMP/ordered_codegen.cpp b/clang/test/OpenMP/ordered_codegen.cpp index ef7d39dfd0a..70da820c1f7 100644 --- a/clang/test/OpenMP/ordered_codegen.cpp +++ b/clang/test/OpenMP/ordered_codegen.cpp @@ -78,7 +78,8 @@ void dynamic1(float *a, float *b, float *c, float *d) { // CHECK: [[IV:%.+]] = load i64, i64* [[OMP_IV]] // CHECK-NEXT: [[UB:%.+]] = load i64, i64* [[OMP_UB]] -// CHECK-NEXT: [[CMP:%.+]] = icmp ule i64 [[IV]], [[UB]] +// CHECK-NEXT: [[BOUND:%.+]] = add i64 [[UB]], 1 +// CHECK-NEXT: [[CMP:%.+]] = icmp ult i64 [[IV]], [[BOUND]] // CHECK-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]] for (unsigned long long i = 131071; i < 2147483647; i += 127) { // CHECK: [[LOOP1_BODY]] |