diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-25 14:25:49 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-25 14:25:49 +0000 |
| commit | 2fe5752e3a7c345cdb59e869278d36af33c13fa4 (patch) | |
| tree | df68ca4b788599e14cbadaf19b704672393efccd /lib/Target/PowerPC/PPCInstrInfo.cpp | |
| parent | 69156b4c20249e7800cc09e0eef0beb3d15ac1ad (diff) | |
Notes
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index bf6e40296405d..d4e666cc1f3e7 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -309,6 +309,11 @@ PPCInstrInfo::commuteInstruction(MachineInstr *MI, bool NewMI) const { unsigned MB = MI->getOperand(4).getImm(); unsigned ME = MI->getOperand(5).getImm(); + // We can't commute a trivial mask (there is no way to represent an all-zero + // mask). + if (MB == 0 && ME == 31) + return nullptr; + if (NewMI) { // Create a new instruction. unsigned Reg0 = ChangeReg0 ? Reg2 : MI->getOperand(0).getReg(); |
