[PATCH] D145599: [CodeGen] Prevent nullptr deref in genAlternativeCodeSequence
Felipe de Azevedo Piovezan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 10:09:16 PST 2023
fdeazeve updated this revision to Diff 503431.
fdeazeve added a comment.
Update commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145599/new/
https://reviews.llvm.org/D145599
Files:
llvm/lib/CodeGen/TargetInstrInfo.cpp
Index: llvm/lib/CodeGen/TargetInstrInfo.cpp
===================================================================
--- llvm/lib/CodeGen/TargetInstrInfo.cpp
+++ llvm/lib/CodeGen/TargetInstrInfo.cpp
@@ -1038,15 +1038,13 @@
Prev = MRI.getUniqueVRegDef(Root.getOperand(2).getReg());
break;
default:
- break;
+ llvm_unreachable("Unknown pattern for machine combiner");
}
// Don't reassociate if Prev and Root are in different blocks.
if (Prev->getParent() != Root.getParent())
return;
- assert(Prev && "Unknown pattern for machine combiner");
-
reassociateOps(Root, *Prev, Pattern, InsInstrs, DelInstrs, InstIdxForVirtReg);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145599.503431.patch
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230308/ab3001ac/attachment.bin>
More information about the llvm-commits
mailing list