diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-06 10:15:34 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-06 10:15:34 +0000 |
commit | 04dad8f66d882707cc70ba7e20df77517dbb5a68 (patch) | |
tree | 23142d281f42251a88e3a78b18537380586046e8 /llvm/lib | |
parent | 07d91cd98aab936c0cc9bf168dc83574941d37a5 (diff) | |
download | bcm5719-llvm-04dad8f66d882707cc70ba7e20df77517dbb5a68.tar.gz bcm5719-llvm-04dad8f66d882707cc70ba7e20df77517dbb5a68.zip |
[X86] X86InstrInfo::findThreeSrcCommutedOpIndices - fix unread variable warning.
scan-build was reporting that CommutableOpIdx1 never used its original initialized value - move it down to where its first used to make the real initialization more obvious (and matches the comment that's there).
llvm-svn: 360028
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 480292b06a3..c8ba54c56b7 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -1769,7 +1769,6 @@ X86InstrInfo::findThreeSrcCommutedOpIndices(const MachineInstr &MI, // regardless of the FMA opcode. The FMA opcode is adjusted later. if (SrcOpIdx1 == CommuteAnyOperandIndex || SrcOpIdx2 == CommuteAnyOperandIndex) { - unsigned CommutableOpIdx1 = SrcOpIdx1; unsigned CommutableOpIdx2 = SrcOpIdx2; // At least one of operands to be commuted is not specified and @@ -1785,6 +1784,8 @@ X86InstrInfo::findThreeSrcCommutedOpIndices(const MachineInstr &MI, // CommutableOpIdx2 is well defined now. Let's choose another commutable // operand and assign its index to CommutableOpIdx1. unsigned Op2Reg = MI.getOperand(CommutableOpIdx2).getReg(); + + unsigned CommutableOpIdx1; for (CommutableOpIdx1 = LastCommutableVecOp; CommutableOpIdx1 >= FirstCommutableVecOp; CommutableOpIdx1--) { // Just ignore and skip the k-mask operand. |