diff options
author | Kang Zhang <shkzhang@cn.ibm.com> | 2018-11-26 06:03:25 +0000 |
---|---|---|
committer | Kang Zhang <shkzhang@cn.ibm.com> | 2018-11-26 06:03:25 +0000 |
commit | e98d4f511c83b3de5da53206847aa839406183ab (patch) | |
tree | 5bb4ee8618419b8806d00fa719aa097b1e19b9d3 /llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | |
parent | 372b1e796be6f4dbe872feed6beae27c5c9d4d26 (diff) | |
download | bcm5719-llvm-e98d4f511c83b3de5da53206847aa839406183ab.tar.gz bcm5719-llvm-e98d4f511c83b3de5da53206847aa839406183ab.zip |
[PowerPC] Fix inconsistent ImmMustBeMultipleOf for same instruction
Summary:
There are 4 instructions which have Inconsistent ImmMustBeMultipleOf in the
function PPCInstrInfo::instrHasImmForm, they are LFS, LFD, STFS, STFD.
These four instructions should set the ImmMustBeMultipleOf to 1 instead of 4.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D54738
llvm-svn: 347532
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp index 559ed59bec9..0eaadd70a47 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -2984,8 +2984,10 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, if (PostRA) { if (isVFReg(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::LXSSP; - else + else { III.ImmOpcode = PPC::LFS; + III.ImmMustBeMultipleOf = 1; + } break; } LLVM_FALLTHROUGH; @@ -2996,8 +2998,10 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, if (PostRA) { if (isVFReg(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::LXSD; - else + else { III.ImmOpcode = PPC::LFD; + III.ImmMustBeMultipleOf = 1; + } break; } LLVM_FALLTHROUGH; @@ -3012,8 +3016,10 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, if (PostRA) { if (isVFReg(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::STXSSP; - else + else { III.ImmOpcode = PPC::STFS; + III.ImmMustBeMultipleOf = 1; + } break; } LLVM_FALLTHROUGH; @@ -3024,8 +3030,10 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, if (PostRA) { if (isVFReg(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::STXSD; - else + else { III.ImmOpcode = PPC::STFD; + III.ImmMustBeMultipleOf = 1; + } break; } LLVM_FALLTHROUGH; |