[flang-commits] [flang] [Flang] Extracting internal constants from scalar literals (PR #73829)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Dec 7 10:04:57 PST 2023


================
@@ -0,0 +1,32 @@
+! RUN: %flang_fc1 -emit-fir %s -o - | fir-opt --const-extruder-opt | FileCheck %s
----------------
kiranchandramohan wrote:

Since this is a pass, i guess it should be  `fir-opt` only test.

We probably have to add a few more tests. An interesting case is if the function is called only conditionally. A few negative tests also to ensure we do not globalise variables that have a single constant assignment, or multiple constant assignments would be useful.

https://github.com/llvm/llvm-project/pull/73829


More information about the flang-commits mailing list