projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50ee05a
)
GlobalISel: Fix a failing combiner test
author
Volkan Keles
<vkeles@apple.com>
Tue, 15 Sep 2020 23:40:38 +0000
(16:40 -0700)
committer
Volkan Keles
<vkeles@apple.com>
Tue, 15 Sep 2020 23:40:38 +0000
(16:40 -0700)
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.
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index
7421599
..
5e2b862
100644
(file)
--- a/
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@
-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;
}