From 1286bf2696c41e9da9a6e55a73e4f61a2ab92dd0 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 25 Aug 2017 01:26:13 +0000 Subject: [PATCH] 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. llvm-svn: 311743 --- include/llvm/Target/TargetLowering.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index df9e8eee20b..30f60fa0b0a 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -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.