https://github.com/ronlieb updated 
https://github.com/llvm/llvm-project/pull/161583

>From ace158832c3d24755b19039fb49e356961d8e122 Mon Sep 17 00:00:00 2001
From: Jan Svoboda <[email protected]>
Date: Wed, 1 Oct 2025 13:40:32 -0700
Subject: [PATCH] [clang] Invert condition refactored in #160935

---
 clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 +-
 clang/test/OpenMP/amdgcn_save_temps.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp 
b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 75bde3f72c4c2..8cda583313ca4 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -1542,7 +1542,7 @@ static llvm::TargetRegionEntryInfo 
getEntryInfoFromPresumedLoc(
     SourceManager &SM = CGM.getContext().getSourceManager();
     PresumedLoc PLoc = SM.getPresumedLoc(BeginLoc);
 
-    if (CGM.getFileSystem()->exists(PLoc.getFilename()))
+    if (!CGM.getFileSystem()->exists(PLoc.getFilename()))
       PLoc = SM.getPresumedLoc(BeginLoc, /*UseLineDirectives=*/false);
 
     return std::pair<std::string, uint64_t>(PLoc.getFilename(), 
PLoc.getLine());
diff --git a/clang/test/OpenMP/amdgcn_save_temps.c 
b/clang/test/OpenMP/amdgcn_save_temps.c
index ebf0d6031ee82..d838bb1166b6b 100644
--- a/clang/test/OpenMP/amdgcn_save_temps.c
+++ b/clang/test/OpenMP/amdgcn_save_temps.c
@@ -1,8 +1,6 @@
 
 // REQUIRES: amdgpu-registered-target
 
-// XFAIL: *
-
 // RUN: %clang_cc1 -E -fopenmp -x c -triple amdgcn-amd-amdhsa 
-fopenmp-targets=amdgcn-amd-amdhsa -save-temps=cwd %s -o 
%t-openmp-amdgcn-amd-amdhsa-gfx90a.i
 // RUN: %clang_cc1 -fopenmp  -x c -triple x86_64-unknown-unknown 
-fopenmp-targets=amdgcn-amd-amdhsa -save-temps=cwd -emit-llvm-bc %s -o 
%t-x86_64-unknown-unknown.bc
 // RUN: %clang_cc1 -fopenmp -x c -triple amdgcn-amd-amdhsa 
-fopenmp-targets=amdgcn-amd-amdhsa -save-temps=cwd -emit-llvm 
-fopenmp-is-target-device -x cpp-output %t-openmp-amdgcn-amd-amdhsa-gfx90a.i 
-fopenmp-host-ir-file-path %t-x86_64-unknown-unknown.bc -o - | FileCheck %s

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to