Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tschuett committed Jul 4, 2024
1 parent ecb40d3 commit 24e043a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7605,7 +7605,7 @@ bool CombinerHelper::matchFoldC1Minus2MinusC2(const MachineInstr &MI,

MatchInfo = [=](MachineIRBuilder &B) {
auto Const = B.buildConstant(DstTy, *MaybeC1 - *MaybeC2);
B.buildSub(Dst, Sub2->getRHSReg(), Const);
B.buildSub(Dst, Const, Sub2->getRHSReg());
};

return true;
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/GlobalISel/combine-integer.mir
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -49
; CHECK-NEXT: %sub:_(s64) = G_SUB %a, [[C]]
; CHECK-NEXT: %sub:_(s64) = G_SUB [[C]], %a
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
Expand Down

0 comments on commit 24e043a

Please sign in to comment.