]> granicus.if.org Git - llvm/commitdiff
[X86] isBinOp - move commutative ops to isCommutativeBinOp. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jun 2019 16:23:28 +0000 (16:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jun 2019 16:23:28 +0000 (16:23 +0000)
TargetLoweringBase::isBinOp checks isCommutativeBinOp as a fallback, so don't duplicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364072 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 5371d0a0a26625a2e0c326c6a16501e0dd958f19..30c05a3efb0ebcd6ef53916ebaa2179ad3587657 100644 (file)
@@ -28545,17 +28545,12 @@ bool X86TargetLowering::isVectorShiftByScalarCheap(Type *Ty) const {
 
 bool X86TargetLowering::isBinOp(unsigned Opcode) const {
   switch (Opcode) {
+  // These are non-commutative binops.
   // TODO: Add more X86ISD opcodes once we have test coverage.
   case X86ISD::ANDNP:
-  case X86ISD::PMULUDQ:
   case X86ISD::FMAX:
   case X86ISD::FMIN:
-  case X86ISD::FMAXC:
-  case X86ISD::FMINC:
-  case X86ISD::FAND:
   case X86ISD::FANDN:
-  case X86ISD::FOR:
-  case X86ISD::FXOR:
     return true;
   }
 
@@ -28566,6 +28561,11 @@ bool X86TargetLowering::isCommutativeBinOp(unsigned Opcode) const {
   switch (Opcode) {
   // TODO: Add more X86ISD opcodes once we have test coverage.
   case X86ISD::PMULUDQ:
+  case X86ISD::FMAXC:
+  case X86ISD::FMINC:
+  case X86ISD::FAND:
+  case X86ISD::FOR:
+  case X86ISD::FXOR:
     return true;
   }