[llvm] r311743 - DAG: Fix naming crime

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 18:26:13 PDT 2017


Author: arsenm
Date: Thu Aug 24 18:26:13 2017
New Revision: 311743

URL: http://llvm.org/viewvc/llvm-project?rev=311743&view=rev
Log:
DAG: Fix naming crime

Because isOperationCustom was only checking for custom
lowering on illegal types, this was behaving inconsistently
with the other isOperation* functions, so that
isOperationLegalOrCustom != (isOperationLegal || isOperationCustom)

Luckily this is only used in one place which already checks the
type legality on its own.

Modified:
    llvm/trunk/include/llvm/Target/TargetLowering.h

Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=311743&r1=311742&r2=311743&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Thu Aug 24 18:26:13 2017
@@ -790,11 +790,10 @@ public:
        getOperationAction(Op, VT) == Promote);
   }
 
-  /// Return true if the specified operation is illegal but has a custom lowering
-  /// on that type. This is used to help guide high-level lowering
-  /// decisions.
+  /// Return true if the operation uses custom lowering, regardless of whether
+  /// the type is legal or not.
   bool isOperationCustom(unsigned Op, EVT VT) const {
-    return (!isTypeLegal(VT) && getOperationAction(Op, VT) == Custom);
+    return getOperationAction(Op, VT) == Custom;
   }
 
   /// Return true if lowering to a jump table is allowed.




More information about the llvm-commits mailing list