[flang-commits] [flang] [flang] Implement lowering for BOZ literal arguments in BGE, BLE, BGT, BLT (PR #191874)
via flang-commits
flang-commits at lists.llvm.org
Mon Apr 13 12:01:55 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- flang/lib/Lower/ConvertExprToHLFIR.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/ConvertExprToHLFIR.cpp b/flang/lib/Lower/ConvertExprToHLFIR.cpp
index 9ac8685d4..83448d434 100644
--- a/flang/lib/Lower/ConvertExprToHLFIR.cpp
+++ b/flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -1623,10 +1623,12 @@ private:
// BOZ literals reach lowering only from BGE/BGT/BLE/BLT intrinsics when at
// least one operand is not constant (otherwise folds). For all other
// intrinsics, semantics converts BOZ to the expected type before lowering.
- Fortran::evaluate::Constant<Fortran::evaluate::LargestInt> intConstant{expr};
+ Fortran::evaluate::Constant<Fortran::evaluate::LargestInt> intConstant{
+ expr};
mlir::Location loc{getLoc()};
fir::ExtendedValue exv{Fortran::lower::convertConstant(
- getConverter(), loc, intConstant, /*outlineBigConstantInReadOnlyMemory=*/false)};
+ getConverter(), loc, intConstant,
+ /*outlineBigConstantInReadOnlyMemory=*/false)};
if (const auto *scalarBox{exv.getUnboxed()})
if (fir::isa_trivial(scalarBox->getType()))
return hlfir::EntityWithAttributes(*scalarBox);
``````````
</details>
https://github.com/llvm/llvm-project/pull/191874
More information about the flang-commits
mailing list