[flang-commits] [flang] [flang] Fix Windows bot failure caused by #146667 (PR #147002)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Thu Jul 3 22:43:22 PDT 2025


https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/147002

Fixes a Windows bot failure caused by #146667. Just run the test if an AMD GPU target is registered. Hopefully, the bot now passes.

Test quality is not reduced since `bbc` is still run on all platforms.

>From c5d0cef5916832c81e15cbfccff0d2611254e326 Mon Sep 17 00:00:00 2001
From: ergawy <kareem.ergawy at amd.com>
Date: Fri, 4 Jul 2025 00:40:53 -0500
Subject: [PATCH] [flang] Fix Windows bot failure caused by #146667

Fixes a Windows bot failure caused by #146667. Just run the test if an
AMD GPU target is registered. Hopefully, the bot now passes.

Test quality is not reduced since `bbc` is still run on all platforms.
---
 flang/test/Lower/OpenMP/parallel-reduction-array.f90 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
index 4f889d9a4e77f..d410714b1573e 100644
--- a/flang/test/Lower/OpenMP/parallel-reduction-array.f90
+++ b/flang/test/Lower/OpenMP/parallel-reduction-array.f90
@@ -2,7 +2,8 @@
 ! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s --check-prefix=CPU
 
 ! RUN: bbc -emit-hlfir -fopenmp -fopenmp-is-target-device -fopenmp-is-gpu -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
-! RUN: %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | FileCheck %s --check-prefix=GPU
+! RUN: %if amdgpu-registered-target %{ %flang_fc1 -triple amdgcn-amd-amdhsa -emit-hlfir -fopenmp -fopenmp-is-target-device -o - %s 2>&1 | \
+! RUN: FileCheck %s --check-prefix=GPU %}
 
 program reduce
 integer, dimension(3) :: i = 0



More information about the flang-commits mailing list