Re: [PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-29 Thread Li Huang via cfe-commits
lihuang added a comment. You are right. A regression test could be: void foo2(int *dw, int *uw, int *A, int *B, int *C, int *D, int N) { for (int i = 0; i < N; i++) { dw[i] = A[i] + B[i - 1] + C[i - 2]; uw[i] = A[i] + B[i + 2]; } } need to fix the fundamental problem.

Re: [PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-29 Thread Li Huang via cfe-commits
lihuang added a comment. Hi Adam, The change in http://reviews.llvm.org/D18777 breaks this test becasue it converts some sexts to zexts, which cannot be eliminated by indvar-simplification after widening IV. The IR after indvar-simplification and before loop-vectorization is like: ...

Re: [PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-28 Thread Adam Nemet via cfe-commits
anemet added a comment. In http://reviews.llvm.org/D21773#469596, @lihuang wrote: > IV is promoted to 64-bit but the trunc/zext cannot be eliminated (at least > cannot be eliminated with the -O1 pass pipeline). Then optimzation remark > becomes: > > optimization-remark-options.c:17:3:

Re: [PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-28 Thread Adam Nemet via cfe-commits
anemet added a comment. > This test checks the loop-vectorization remarks when pointer checking > threshold is exceeded. The change in http://reviews.llvm.org/D18777 would > introduce zexts that cannot be removed so that the "loop not vectorized" > reason is changed, hence breaking this test.

Re: [PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-28 Thread Sanjoy Das via cfe-commits
sanjoy added a subscriber: anemet. sanjoy added a comment. Sound plausible, but I don't know this area (optimization remarks) well enough to sign off on this. @anemet can you please take a look? http://reviews.llvm.org/D21773 ___ cfe-commits

[PATCH] D21773: [clang] Update an optimization remark test for change D18777

2016-06-27 Thread Li Huang via cfe-commits
lihuang created this revision. lihuang added reviewers: sanjoy, reames. lihuang added a subscriber: cfe-commits. Update an optimization remark test for change D18777. This test checks the loop-vectorization remarks when pointer checking threshold is exceeded. The change in D18777 would