Skip to content

Commit ed463e0

Browse files
committed
Removed the redundant checks.
1 parent e8177b2 commit ed463e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,7 @@ bool RISCVRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
587587
(Lo12 & 0b11111) != 0) {
588588
// Prefetch instructions require the offset to be 32 byte aligned.
589589
MI.getOperand(FIOperandNum + 1).ChangeToImmediate(0);
590-
} else if (Opc == RISCV::MIPS_PREFETCH && Subtarget.hasVendorXMIPSCBOP() &&
591-
!isUInt<9>(Val)) {
590+
} else if (Opc == RISCV::MIPS_PREFETCH && !isUInt<9>(Val)) {
592591
// MIPS Prefetch instructions require the offset to be 9 bits encoded.
593592
MI.getOperand(FIOperandNum + 1).ChangeToImmediate(0);
594593
} else if ((Opc == RISCV::PseudoRV32ZdinxLD ||

llvm/test/CodeGen/RISCV/xmips-cbop.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc -mtriple=riscv32 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs < %s \
2+
; RUN: llc -mtriple=riscv32 -mattr=+xmipscbop -verify-machineinstrs < %s \
33
; RUN: | FileCheck %s -check-prefix=RV32XMIPSPREFETCH
4-
; RUN: llc -mtriple=riscv64 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs < %s \
4+
; RUN: llc -mtriple=riscv64 -mattr=+xmipscbop -verify-machineinstrs < %s \
55
; RUN: | FileCheck %s -check-prefix=RV64XMIPSPREFETCH
66

77
define void @prefetch_data_read(ptr noundef %ptr) nounwind {

0 commit comments

Comments
 (0)