[PATCH] D62164: [PowerPC] Enable MachinePipeliner for P9 with -ppc-enable-pipeliner
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 08:51:35 PDT 2019
hfinkel added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:3947
+ return &I;
+ assert(0 && "Can NOT find MTCTR in preheader\n");
+ return nullptr;
----------------
Two things:
1. Never use assert(0 && ...), that's what llvm_unreachable is for.
2. Don't assert here, just return nullptr. This is not actually an error, it *could* happen, and the compiler shouldn't crash. If you'd like, add a STATISTIC to count the number of times this happens.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62164/new/
https://reviews.llvm.org/D62164
More information about the llvm-commits
mailing list