We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1a74c9 commit e78eef2Copy full SHA for e78eef2
llvm/lib/Target/X86/X86CmovConversion.cpp
@@ -555,7 +555,7 @@ bool X86CmovConverterPass::checkForProfitableCmovCandidates(
555
// This is another conservative check to avoid converting CMOV instruction
556
// used with tree-search like algorithm, where the branch is unpredicted.
557
auto UIs = MRI->use_instructions(MI->defs().begin()->getReg());
558
- if (!UIs.empty() && ++UIs.begin() == UIs.end()) {
+ if (hasSingleElement(UIs)) {
559
unsigned Op = UIs.begin()->getOpcode();
560
if (Op == X86::MOV64rm || Op == X86::MOV32rm) {
561
WorthOpGroup = false;
0 commit comments