https://github.com/erichkeane created 
https://github.com/llvm/llvm-project/pull/184699

Discovered during CI in a different patch, 3 tests started failing for unknown 
reasons due to some very mild changes to the IR, but only in 'classic' codgen 
parts of the tests.  These tests were overly specific for no good reason, so 
this patch just fixes that.

>From 07500d5f716a90ccc78c6995738185217a025e94 Mon Sep 17 00:00:00 2001
From: erichkeane <[email protected]>
Date: Wed, 4 Mar 2026 15:03:46 -0800
Subject: [PATCH] [CIR][NFCI] Fixup some test regressions due to OGCG changes

Discovered during CI in a different patch, 3 tests started failing for
unknown reasons due to some very mild changes to the IR, but only in
'classic' codgen parts of the tests.  These tests were overly specific
for no good reason, so this patch just fixes that.
---
 clang/test/CIR/CodeGen/complex-compound-assignment.cpp | 4 ++--
 clang/test/CIR/CodeGen/complex-mul-div.cpp             | 4 ++--
 clang/test/CIR/CodeGen/optsize-func-attr.cpp           | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/clang/test/CIR/CodeGen/complex-compound-assignment.cpp 
b/clang/test/CIR/CodeGen/complex-compound-assignment.cpp
index 34e9f0dace1ad..b427ac5f5be2d 100644
--- a/clang/test/CIR/CodeGen/complex-compound-assignment.cpp
+++ b/clang/test/CIR/CodeGen/complex-compound-assignment.cpp
@@ -471,10 +471,10 @@ void foo7() {
 // OGCG: %[[C_REAL:.*]] = fsub float %[[MUL_BR_AR]], %[[MUL_BI_AI]]
 // OGCG: %[[C_IMAG:.*]] = fadd float %[[MUL_BR_AI]], %[[MUL_BI_AR]]
 // OGCG: %[[IS_C_REAL_NAN:.*]] = fcmp uno float %[[C_REAL]], %[[C_REAL]]
-// OGCG: br i1 %[[IS_C_REAL_NAN]], label %[[COMPLEX_IS_IMAG_NAN:.*]], label 
%[[END_LABEL:.*]], !prof !2
+// OGCG: br i1 %[[IS_C_REAL_NAN]], label %[[COMPLEX_IS_IMAG_NAN:.*]], label 
%[[END_LABEL:[^,]*]]
 // OGCG: [[COMPLEX_IS_IMAG_NAN]]:
 // OGCG:  %[[IS_C_IMAG_NAN:.*]] = fcmp uno float %[[C_IMAG]], %[[C_IMAG]]
-// OGCG:  br i1 %[[IS_C_IMAG_NAN]], label %[[COMPLEX_LIB_CALL:.*]], label 
%[[END_LABEL]], !prof !2
+// OGCG:  br i1 %[[IS_C_IMAG_NAN]], label %[[COMPLEX_LIB_CALL:.*]], label 
%[[END_LABEL]]
 // OGCG: [[COMPLEX_LIB_CALL]]:
 // OGCG:  %[[CALL_RESULT:.*]] = call{{.*}} <2 x float> @__mulsc3(float noundef 
%[[B_REAL]], float noundef %[[B_IMAG]], float noundef %[[A_REAL]], float 
noundef %[[A_IMAG]])
 // OGCG:  store <2 x float> %[[CALL_RESULT]], ptr %[[COMPLEX_CALL_ADDR]], 
align 4
diff --git a/clang/test/CIR/CodeGen/complex-mul-div.cpp 
b/clang/test/CIR/CodeGen/complex-mul-div.cpp
index 09bd4ef70fbce..dba594ec42781 100644
--- a/clang/test/CIR/CodeGen/complex-mul-div.cpp
+++ b/clang/test/CIR/CodeGen/complex-mul-div.cpp
@@ -186,10 +186,10 @@ void foo() {
 // OGCG-FULL: %[[C_REAL:.*]] = fsub float %[[MUL_AR_BR]], %[[MUL_AI_BI]]
 // OGCG-FULL: %[[C_IMAG:.*]] = fadd float %[[MUL_AR_BI]], %[[MUL_AI_BR]]
 // OGCG-FULL: %[[IS_C_REAL_NAN:.*]] = fcmp uno float %[[C_REAL]], %[[C_REAL]]
-// OGCG-FULL: br i1 %[[IS_C_REAL_NAN]], label %[[COMPLEX_IS_IMAG_NAN:.*]], 
label %[[END_LABEL:.*]], !prof !2
+// OGCG-FULL: br i1 %[[IS_C_REAL_NAN]], label %[[COMPLEX_IS_IMAG_NAN:.*]], 
label %[[END_LABEL:[^,]*]]
 // OGCG-FULL: [[COMPLEX_IS_IMAG_NAN]]:
 // OGCG-FULL:  %[[IS_C_IMAG_NAN:.*]] = fcmp uno float %[[C_IMAG]], %[[C_IMAG]]
-// OGCG-FULL:  br i1 %[[IS_C_IMAG_NAN]], label %[[COMPLEX_LIB_CALL:.*]], label 
%[[END_LABEL]], !prof !2
+// OGCG-FULL:  br i1 %[[IS_C_IMAG_NAN]], label %[[COMPLEX_LIB_CALL:.*]], label 
%[[END_LABEL]]
 // OGCG-FULL: [[COMPLEX_LIB_CALL]]:
 // OGCG-FULL:  %[[CALL_RESULT:.*]] = call noundef <2 x float> @__mulsc3(float 
noundef %[[A_REAL]], float noundef %[[A_IMAG]], float noundef %[[B_REAL]], 
float noundef %[[B_IMAG]])
 // OGCG-FULL:  store <2 x float> %[[CALL_RESULT]], ptr %[[COMPLEX_CALL_ADDR]], 
align 4
diff --git a/clang/test/CIR/CodeGen/optsize-func-attr.cpp 
b/clang/test/CIR/CodeGen/optsize-func-attr.cpp
index 28441b8558584..38983452b3cab 100644
--- a/clang/test/CIR/CodeGen/optsize-func-attr.cpp
+++ b/clang/test/CIR/CodeGen/optsize-func-attr.cpp
@@ -71,4 +71,4 @@ extern "C" {
 // OGCG-NOT: minsize
 //
 // to block the 'NOT'.
-// BOTH: llvm.module.flags
+// BOTH: !llvm.

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

Reply via email to