[PATCH] D119429: [flang] Lower simple RETURN statement
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 10 05:26:41 PST 2022
kiranchandramohan added inline comments.
================
Comment at: flang/lib/Lower/Bridge.cpp:679
+ }
+ builder->create<mlir::cf::BranchOp>(loc, funit->finalBlock);
}
----------------
Is this branch necessary? The branch seems to be added in 343 of `genProcedureExit`.
================
Comment at: flang/test/Lower/return-statement.f90:15-18
+// CHECK-LABEL: func @_QPsub1() {
+// CHECK: cf.br ^bb1
+// CHECK: ^bb1: // pred: ^bb0
+// CHECK: return
----------------
Different kinds of comments in the same test (// vs !). Using `!` helps to get the test passing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119429/new/
https://reviews.llvm.org/D119429
More information about the llvm-commits
mailing list