Skip to content

Commit 9764b21

Browse files
committed
accidentally negated a conditional, fixed
1 parent 7c396ad commit 9764b21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
475475
InsertPosition InsertBefore = nullptr, Instruction *MDFrom = nullptr) {
476476
SelectInst *SI =
477477
SelectInst::Create(C, S1, S2, NameStr, InsertBefore, MDFrom);
478-
if (!SI) {
478+
if (SI && !MDFrom) {
479479
assert(F && "provided parent function is nullptr!");
480480
setExplicitlyUnknownBranchWeightsIfProfiled(*SI, *F, DEBUG_TYPE);
481481
}

0 commit comments

Comments
 (0)