We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45abd19 commit f3fa7aaCopy full SHA for f3fa7aa
llvm/lib/Target/DirectX/DXILValidateMetadata.cpp
@@ -17,6 +17,7 @@
17
#include "llvm/IR/Constants.h"
18
#include "llvm/IR/DiagnosticInfo.h"
19
#include "llvm/IR/DiagnosticPrinter.h"
20
+#include "llvm/IR/Instructions.h"
21
#include "llvm/IR/LLVMContext.h"
22
#include "llvm/IR/Metadata.h"
23
#include "llvm/IR/Module.h"
@@ -142,8 +143,9 @@ static void validateInstructionMetadata(Module &M) {
142
143
for (Function &F : M)
144
for (BasicBlock &BB : F)
145
for (Instruction &I : BB) {
- if (MDNode *LoopMD = I.getMetadata(MDLoopKind))
146
- validateLoopMetadata(M, LoopMD);
+ if (isa<BranchInst>(I))
147
+ if (MDNode *LoopMD = I.getMetadata(MDLoopKind))
148
+ validateLoopMetadata(M, LoopMD);
149
}
150
151
0 commit comments