[flang-commits] [flang] [flang] Use CHECK-DAG to check constants (NFC) (PR #184097)

lonely eagle via flang-commits flang-commits at lists.llvm.org
Mon Mar 2 03:05:21 PST 2026


https://github.com/linuxlonelyeagle created https://github.com/llvm/llvm-project/pull/184097

It is part of https://github.com/llvm/llvm-project/pull/180556, as a separate NFC PR.

>From 7eeeeb67ab4afc1c231fde9443cc91c1c12c733e Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Mon, 2 Mar 2026 11:02:57 +0000
Subject: [PATCH] use CHECK-DAG to check constants.

---
 flang/test/Lower/HLFIR/goto-do-body.f90 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/flang/test/Lower/HLFIR/goto-do-body.f90 b/flang/test/Lower/HLFIR/goto-do-body.f90
index 05b666919c4c7..8a04e5465a81a 100644
--- a/flang/test/Lower/HLFIR/goto-do-body.f90
+++ b/flang/test/Lower/HLFIR/goto-do-body.f90
@@ -55,12 +55,12 @@ subroutine sub2()
   implicit none
   integer :: i, j
   external foo
-! CHECK:    %[[C_7:.*]] = arith.constant -7 : i32
-! CHECK:    %[[C8:.*]] = arith.constant 8 : i32
-! CHECK:    %[[C2:.*]] = arith.constant 2 : i32
-! CHECK:    %[[C0:.*]] = arith.constant 0 : i32
-! CHECK:    %[[C3:.*]] = arith.constant 3 : i32
-! CHECK:    %[[C1:.*]] = arith.constant 1 : i32
+! CHECK-DAG:    %[[C_7:.*]] = arith.constant -7 : i32
+! CHECK-DAG:    %[[C8:.*]] = arith.constant 8 : i32
+! CHECK-DAG:    %[[C2:.*]] = arith.constant 2 : i32
+! CHECK-DAG:    %[[C0:.*]] = arith.constant 0 : i32
+! CHECK-DAG:    %[[C3:.*]] = arith.constant 3 : i32
+! CHECK-DAG:    %[[C1:.*]] = arith.constant 1 : i32
 ! CHECK:    %[[TRIP:.*]] = fir.alloca i32
 ! CHECK:    %[[I_REF:.*]] = fir.alloca i32 {bindc_name = "i", {{.*}}}
 ! CHECK:    %[[I:.*]]:2 = hlfir.declare %[[I_REF]] {uniq_name = "_QFsub2Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)



More information about the flang-commits mailing list