search for: md_loop

Displaying 1 result from an estimated 1 matches for "md_loop".

Did you mean: max_loop
2018 Jul 06
2
Verify that we only get loop metadata on latches
...around a little bit with teaching the IR Verifier in opt to check that !llvm.loop only is put in loop latches. Something like this might do the trick, when added to Verifier::visitInstruction in lib/IR/Verifier.cpp: ``` #include "llvm/Analysis/LoopInfo.h" if (I.getMetadata(LLVMContext::MD_loop)) { // FIXME: Is SwitchInst also allowed? Assert(isa<BranchInst>(I), "llvm.loop only expected on branches", &I); LoopInfo LI; LI.analyze(DT); Loop* L = LI.getLoopFor(BB); Assert(L, "llvm.loop not in a loop", &I); Assert(L->isLoopLatch(BB), "ll...