[flang-commits] [flang] [flang][NFC] Converted five tests from old lowering to new lowering (part 6) (PR #175485)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Jan 12 07:21:07 PST 2026


================
@@ -1,303 +1,93 @@
-! RUN: bbc --emit-fir -hlfir=false %s -o - | FileCheck %s
-! RUN: bbc -hlfir=false -fwrapv %s -o - | FileCheck --check-prefix=PostOpt %s
-
+! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
+! RUN: bbc -emit-hlfir -fwrapv %s -o - | FileCheck %s
+! Note: with the old lowering, -fwrapv made a differents in FIR output.
+! With lowering to HLFIR, there's no difference at HLFIR level.
----------------
eugeneepshteyn wrote:

For flang lowering, the only test that "properly" tests `-fwrapv` and checks for no overflow flag is Lower/nsw.f90.

As far as I can tell, the other ussages of `-fwrapv` were in the old lowering tests. Tagging @jeanPerier for context.

Note that I also tried to emit FIR with the new lowering and FIR was the same with and without `-fwrapv`.

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


More information about the flang-commits mailing list