[flang-commits] [PATCH] D151487: [flang][hlfir] Only canonicalize forall_index if it can be erased
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu May 25 12:38:40 PDT 2023
jeanPerier created this revision.
jeanPerier added reviewers: vzakhari, clementval.
jeanPerier added a project: Flang.
Herald added subscribers: sunshaoce, bzcheeseman, mehdi_amini, rriddle, jdoerfert, arphaman.
Herald added a project: All.
jeanPerier requested review of this revision.
Herald added a subscriber: stephenneuendorffer.
It seems the canonicalization was not correct: it cannot return that
it failed if it did modify the IR.
This was exposed by a new MLIR sanity check added in
https://reviews.llvm.org/D144552.
I am not sure it is legit to return success if the operation being
canonicalized is not modified either. So only remove the loads if
they are the only uses of the forall_index.
Should fix (intermittent?) bot failures like
https://lab.llvm.org/buildbot/#/builders/179/builds/6251
since the new MLIR check was added.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151487
Files:
flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
flang/test/HLFIR/forall-index.fir
flang/test/Lower/HLFIR/forall.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151487.525755.patch
Type: text/x-patch
Size: 5147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230525/ba721f15/attachment.bin>
More information about the flang-commits
mailing list