[Openmp-dev] OpenMP LIT tests for OpenMPOpt pass

Johannes Doerfert via Openmp-dev openmp-dev at lists.llvm.org
Wed Dec 9 10:46:52 PST 2020


Please use the opt tool. It should look like the other tests in 
`llvm/test/Transforms/OpenMP` do.

~ Johannes


On 12/9/20 11:53 AM, Abid Malik via Openmp-dev wrote:
> Hello,
>
> I am writing test cases for the OpenMPOpt pass. I am dumping the IR and
> then checking the correctness of IR (after certain openmp related
> optimizations). For example;
> // RUN: %clang_cc1 -verify -fopenmp -O3 -x c -std=c99 -emit-llvm %s -o - |
> FileCheck %s
> // expected-no-diagnostics
>
> void test_1(){
>
> #pragma omp parallel
> {
> #pragma omp for
> for (int i=0; i < 100; i++);
> }
> }
>
> // CHECK: define void @test_1()
> // CHECK: ...) @__kmpc_for_call(
> // CHECK: ret void
> // CHECK: define internal void @.omp_outlined.(
> // CHECK: call void @__kmpc_for_static_init_4(
> // CHECK: call void @__kmpc_for_static_fini(
> // CHECK-NEXT: call void @__kmpc_barrier(
> // CHECK: ret void
>
>
> Is this a valid test format for the pass or should it be through the opt
> tool?
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list