Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ class PatGprImm_32<SDPatternOperator OpNode, LAInst Inst, Operand ImmOpnd>
/// Predicates
def AddLike: PatFrags<(ops node:$A, node:$B),
[(add node:$A, node:$B), (or node:$A, node:$B)], [{
return N->getOpcode() == ISD::ADD || isOrEquivalentToAdd(N);
return CurDAG->isBaseWithConstantOffset(SDValue(N, 0));
}]>;

/// Simple arithmetic operations
Expand Down
3 changes: 1 addition & 2 deletions llvm/test/CodeGen/LoongArch/intrinsic-memcpy.ll
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ define void @box(ptr noalias nocapture noundef writeonly sret(%Box) align 16 der
; CHECK-NEXT: st.d $a1, $a0, 24
; CHECK-NEXT: ld.d $a1, $a3, 16
; CHECK-NEXT: st.d $a1, $a0, 16
; CHECK-NEXT: ori $a1, $a3, 8
; CHECK-NEXT: ld.d $a1, $a1, 0
; CHECK-NEXT: ld.d $a1, $a3, 8
; CHECK-NEXT: st.d $a1, $a0, 8
; CHECK-NEXT: addi.d $sp, $sp, 96
; CHECK-NEXT: ret
Expand Down