[X86] Add a check of isCommutable at the top of X86InstrInfo::findCommutedOpIndices...
authorCraig Topper <craig.topper@gmail.com>
Sat, 13 Aug 2016 06:48:44 +0000 (06:48 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 13 Aug 2016 06:48:44 +0000 (06:48 +0000)
commit8c372a31b7b91adad5566e6ae1436a65879d6025
treec987da9f7468fc596f38cce948672c5327ae94fb
parenteafdbecc44c48527d0a7d52b25ddedce7f7d85b4
[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
llvm/lib/Target/X86/X86InstrInfo.cpp