Skip to content

Commit e6fbfc9

Browse files
Use LookThroughInstrs
1 parent 9408b96 commit e6fbfc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ void RISCVInstructionSelector::getICMPOperandsForBranch(
537537
RHS = MI.getOperand(3).getReg();
538538

539539
// Adjust comparisons to use comparison with 0 if possible.
540-
if (auto Constant = getIConstantVRegSExtVal(RHS, MRI)) {
540+
if (auto Constant = getIConstantVRegSExtVal(RHS, MRI, true)) {
541541
switch (ICMPCC) {
542542
case CmpInst::Predicate::ICMP_SGT:
543543
// Convert X > -1 to X >= 0

0 commit comments

Comments
 (0)