Page MenuHomePhabricator

[flang][hlfir] Only canonicalize forall_index if it can be erased

Authored by jeanPerier on Thu, May 25, 12:38 PM.



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
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
since the new MLIR check was added.

Diff Detail

Event Timeline

jeanPerier created this revision.Thu, May 25, 12:38 PM
jeanPerier requested review of this revision.Thu, May 25, 12:38 PM
This revision is now accepted and ready to land.Thu, May 25, 1:50 PM
vzakhari accepted this revision.Thu, May 25, 9:59 PM