projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eafdbec
)
[X86] Add a check of isCommutable at the top of X86InstrInfo::findCommutedOpIndices...
author
Craig Topper
<craig.topper@gmail.com>
Sat, 13 Aug 2016 06:48:44 +0000
(06:48 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sat, 13 Aug 2016 06:48:44 +0000
(06:48 +0000)
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
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86InstrInfo.cpp
b/llvm/lib/Target/X86/X86InstrInfo.cpp
index
9df179d
..
caa9b85
100644
(file)
--- a/
llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/
llvm/lib/Target/X86/X86InstrInfo.cpp
@@
-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: