]> granicus.if.org Git - llvm/commitdiff
DAG: Fix naming crime
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 25 Aug 2017 01:26:13 +0000 (01:26 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 25 Aug 2017 01:26:13 +0000 (01:26 +0000)
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.

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

include/llvm/Target/TargetLowering.h

index df9e8eee20bc24f1f821d8a052cbf5821827ced5..30f60fa0b0aa0cccc38e57e7c0ac087ac6076202 100644 (file)
@@ -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.