[clang] 9320ac9 - [Clang] Only run test when X86 backend is built.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 1 12:11:17 PDT 2021


On Thu, Apr 1, 2021 at 1:16 AM Florian Hahn <flo at fhahn.com> wrote:
>
> Hi,
>
> On Tue, Mar 30, 2021 at 7:52 PM David Blaikie <dblaikie at gmail.com> wrote:
>>
>> Is there a more reliable remark that could be tested for? (Clang shouldn't be testing all remarks - just that the remark infrastructure in general is wired up (specific remarks should be tested in llvm) - so picking some really stable remark would be great)
>>
>> maybe there's a remark for "this always_inline thing can't be inlined because it's recursive" for instance?
>>
>
> That's a great point, there certainly are more stable remarks, e.g. inlining as you suggested or GVN. I can add a separate test for that, so we can still keep testing the vectorization remark. WDYT?

Actually my goal was to stop testing the vectorization remark in
clang, if it's not an especially stable remark - the remark should be
tested in LLVM in any case (even if it's also tested in Clang). So
ideally we'd test some really simple, stable, reliable remark in clang
that validates that the remark infrastructure works with clang - and
we'd test all the nitty gritty specific remarks down in LLVM only.

- Dave

>
> Cheers,
> Florian
>>
>> On Mon, Mar 29, 2021 at 9:29 AM Florian Hahn via cfe-commits <cfe-commits at lists.llvm.org> wrote:
>>>
>>>
>>> Author: Florian Hahn
>>> Date: 2021-03-29T17:27:01+01:00
>>> New Revision: 9320ac9b4965d769632398b620ca3e4af9b56b12
>>>
>>> URL: https://github.com/llvm/llvm-project/commit/9320ac9b4965d769632398b620ca3e4af9b56b12
>>> DIFF: https://github.com/llvm/llvm-project/commit/9320ac9b4965d769632398b620ca3e4af9b56b12.diff
>>>
>>> LOG: [Clang] Only run test when X86 backend is built.
>>>
>>> After c773d0f97304 the remark is only emitted if the loop is profitable
>>> to vectorize, but cannot be vectorized. Hence, it depends on
>>> X86-specific cost-modeling.
>>>
>>> Added:
>>>
>>>
>>> Modified:
>>>     clang/test/Frontend/optimization-remark-options.c
>>>
>>> Removed:
>>>
>>>
>>>
>>> ################################################################################
>>> diff  --git a/clang/test/Frontend/optimization-remark-options.c b/clang/test/Frontend/optimization-remark-options.c
>>> index 38dbbfbaccec0..f222eff37a5ef 100644
>>> --- a/clang/test/Frontend/optimization-remark-options.c
>>> +++ b/clang/test/Frontend/optimization-remark-options.c
>>> @@ -1,3 +1,4 @@
>>> +// REQUIRES: x86-registered-target
>>>  // RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -Rpass-analysis=loop-vectorize -emit-llvm -S %s -o - 2>&1 | FileCheck %s
>>>
>>>  // CHECK: {{.*}}:9:11: remark: loop not vectorized: cannot prove it is safe to reorder floating-point operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math'.
>>>
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
>
> --
>
> http://www.fhahn.com/


More information about the cfe-commits mailing list