mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
GlobalISel: Fix a failing combiner test
test/CodeGen/AArch64/GlobalISel/combine-trunc.mir was failing due to the different order for evaluating function arguments. This patch updates the related code to fix the issue.
This commit is contained in:
parent
f0d611207d
commit
dfd3344cb4
@ -2113,8 +2113,9 @@ bool CombinerHelper::applyCombineTruncOfShl(
|
||||
Register ShiftSrc = MatchInfo.first;
|
||||
Register ShiftAmt = MatchInfo.second;
|
||||
Builder.setInstrAndDebugLoc(MI);
|
||||
Builder.buildShl(DstReg, Builder.buildTrunc(DstTy, ShiftSrc),
|
||||
Builder.buildTrunc(DstTy, ShiftAmt), SrcMI->getFlags());
|
||||
auto TruncShiftSrc = Builder.buildTrunc(DstTy, ShiftSrc);
|
||||
auto TruncShiftAmt = Builder.buildTrunc(DstTy, ShiftAmt);
|
||||
Builder.buildShl(DstReg, TruncShiftSrc, TruncShiftAmt, SrcMI->getFlags());
|
||||
MI.eraseFromParent();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user