forked from OSchip/llvm-project
[X86] Add a check of isCommutable at the top of X86InstrInfo::findCommutedOpIndices. Most callers don't check if the instruction is commutable before calling.
This saves us the trouble of ending up in the default of the switch and having to determine if this is an FMA or not. llvm-svn: 278597
This commit is contained in:
parent
eafdbecc44
commit
8c372a31b7
|
@ -3503,6 +3503,9 @@ bool X86InstrInfo::findFMA3CommutedOpIndices(
|
|||
|
||||
bool X86InstrInfo::findCommutedOpIndices(MachineInstr &MI, unsigned &SrcOpIdx1,
|
||||
unsigned &SrcOpIdx2) const {
|
||||
if (!MI.isCommutable())
|
||||
return false;
|
||||
|
||||
switch (MI.getOpcode()) {
|
||||
case X86::CMPPDrri:
|
||||
case X86::CMPPSrri:
|
||||
|
|
Loading…
Reference in New Issue