[flang-commits] [flang] [llvm] [flang][PPC] Implement ieee_set_status and ieee_get_status for AIX (PR #215618)
Kelvin Li via flang-commits
flang-commits at lists.llvm.org
Thu Aug 20 18:47:14 PDT 2026
================
@@ -0,0 +1,43 @@
+! Tests HLFIR code generation for ieee_get_status / ieee_set_status on PPC targets.
+!
+! REQUIRES: powerpc-registered-target
+! RUN: %flang_fc1 -triple powerpc64-ibm-aix -emit-hlfir -o - %s | FileCheck %s --check-prefix=CHECK-AIX
+! RUN: %flang_fc1 -triple powerpc64le-unknown-linux-gnu -emit-hlfir -o - %s | FileCheck %s --check-prefix=CHECK-LNX
+
+program test
+ use ieee_arithmetic
+ type(ieee_status_type) :: stat
+! LABEL: func.func @_QQmain
----------------
kkwli wrote:
- add `! CHECK-AIX-LABEL: func.func @_QQmain` and `! CHECK-LNX-LABEL: func.func @_QQmain`
- replace `%c0`, `%c20`, `%c0_0`, and `%c20_1` with `%[[C1]]`, `%[[C2]]`, `%[[C3]]`, and `%[[C4]]` respectively
- add `! CHECK-LNX-NOT: @llvm.ppc.readflm()` and `! CHECK-LNX-NOT: @llvm.ppc.setflm()`
https://github.com/llvm/llvm-project/pull/215618
More information about the flang-commits
mailing list