[flang-commits] [flang] [flang] allow rebox/embox of OPTIONAL (PR #194319)
via flang-commits
flang-commits at lists.llvm.org
Tue Apr 28 03:54:53 PDT 2026
================
@@ -2490,6 +2498,11 @@ std::optional<std::int64_t> fir::EmboxOp::getViewOffset(mlir::OpResult) {
}
mlir::Speculation::Speculatability fir::EmboxOp::getSpeculatability() {
+ // The operation is always safe to evaluate if it has the "optional"
+ // attribute, otherwise it is not safe to evaluate if the input may
+ // be absent.
----------------
jeanPerier wrote:
Doh, thanks for catching this!
https://github.com/llvm/llvm-project/pull/194319
More information about the flang-commits
mailing list