diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-04-19 21:36:24 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-04-19 21:36:24 +0000 |
commit | 3af70c126d2740e8df9ed2746b73c7d7c700dbc5 (patch) | |
tree | 51c010d2b49f983e7f8f359232c97b9cd212a655 /llvm/lib/Target/Hexagon/HexagonPeephole.cpp | |
parent | e83514a546f4745f6f40f0f8f3c62b2256e634e6 (diff) | |
download | bcm5719-llvm-3af70c126d2740e8df9ed2746b73c7d7c700dbc5.tar.gz bcm5719-llvm-3af70c126d2740e8df9ed2746b73c7d7c700dbc5.zip |
[Hexagon] Fix operand swapping in HexagonPeephole
Also, disable zero- and size-extend optimizations for now.
llvm-svn: 266821
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonPeephole.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonPeephole.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonPeephole.cpp b/llvm/lib/Target/Hexagon/HexagonPeephole.cpp index 1a864189756..166efeea706 100644 --- a/llvm/lib/Target/Hexagon/HexagonPeephole.cpp +++ b/llvm/lib/Target/Hexagon/HexagonPeephole.cpp @@ -67,11 +67,11 @@ static cl::opt<bool> DisablePNotP("disable-hexagon-pnotp", cl::desc("Disable Optimization of PNotP")); static cl::opt<bool> DisableOptSZExt("disable-hexagon-optszext", - cl::Hidden, cl::ZeroOrMore, cl::init(false), + cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Disable Optimization of Sign/Zero Extends")); static cl::opt<bool> DisableOptExtTo64("disable-hexagon-opt-ext-to-64", - cl::Hidden, cl::ZeroOrMore, cl::init(false), + cl::Hidden, cl::ZeroOrMore, cl::init(true), cl::desc("Disable Optimization of extensions to i64.")); namespace llvm { @@ -308,6 +308,7 @@ void HexagonPeephole::ChangeOpInto(MachineOperand &Dst, MachineOperand &Src) { case MachineOperand::MO_Register: if (Src.isReg()) { Dst.setReg(Src.getReg()); + Dst.setSubReg(Src.getSubReg()); } else if (Src.isImm()) { Dst.ChangeToImmediate(Src.getImm()); } else { @@ -322,6 +323,7 @@ void HexagonPeephole::ChangeOpInto(MachineOperand &Dst, MachineOperand &Src) { Dst.ChangeToRegister(Src.getReg(), Src.isDef(), Src.isImplicit(), Src.isKill(), Src.isDead(), Src.isUndef(), Src.isDebug()); + Dst.setSubReg(Src.getSubReg()); } else { llvm_unreachable("Unexpected src operand type"); } |