[flang-commits] [flang] [Flang][OpenMP] Add --cg-rewrite pass to convert-to-llvm-openmp-and-fir.fir test (PR #96530)
via flang-commits
flang-commits at lists.llvm.org
Mon Jun 24 11:12:35 PDT 2024
https://github.com/agozillon created https://github.com/llvm/llvm-project/pull/96530
Currently this is missing from the fir-opt command in this test, which means we can't use certain fir.operations inside of the test without causing verification issues. As an example fir::DeclareOp, which I believe the cg-rewrite pass normally converts to fir::cg::XDeclareOp prior to CodeGen'ng to LLVM-IR.
Perhaps, there's a reason for not including this option in the command list originally that I am not aware of! But it would be helpful to enable this pass to allow the full (or at least a wider) range of FIR operations to be used within the test cases.
>From eb2844fa02ca80be24c0e818815ad00c188bfcfc Mon Sep 17 00:00:00 2001
From: agozillon <Andrew.Gozillon at amd.com>
Date: Mon, 24 Jun 2024 12:54:17 -0500
Subject: [PATCH] [Flang][OpenMP] Add --cg-rewrite pass to
convert-to-llvm-openmp-and-fir.fir test
Currently this is missing from the fir-opt command in this test, which
means we can't use certain fir.operations inside of the test without
causing verification issues. As an example fir::DeclareOp, which I
believe the cg-rewrite pass normally converts to fir::cg::XDeclareOp prior to
CodeGen'ng to LLVM-IR.
Perhaps, there's a reason for not including this option in the command list
originally that I am not aware of! But it would be helpful to enable this
pass to allow the full (or at least a wider) range of FIR operations to be
used within the test cases.
---
flang/test/Fir/convert-to-llvm-openmp-and-fir.fir | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
index 396fbaeacf39f..f8873ce57e913 100644
--- a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
+++ b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cfg-conversion --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-opt --split-input-file --cg-rewrite --cfg-conversion --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
func.func @_QPsb1(%arg0: !fir.ref<i32> {fir.bindc_name = "n"}, %arg1: !fir.ref<!fir.array<?xi32>> {fir.bindc_name = "arr"}) {
%c1_i64 = arith.constant 1 : i64
More information about the flang-commits
mailing list