[PATCH] D101142: [SimplifyCFG/JumpThreading] Do not simplify empty blocks with unconditional branches if this causes loop metadata confusion.
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 07:00:45 PDT 2021
jeroen.dobbelaere added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1090
+ MDNode *PredMD = PredTI ? PredTI->getMetadata(LoopMDKind) : nullptr;
+ if (LoopMD != PredMD && BBIsLatch && IsLoopLatch(PredBB))
+ return false;
----------------
Is (LoopMD != PredMD) a sufficient rule ?
Assume you have two nested loops with both a 'loop unroll 4' annotation. Can we get in a situation where both latches would be merged ? If so, is it valid then to still merge the latches ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101142/new/
https://reviews.llvm.org/D101142
More information about the llvm-commits
mailing list