[PATCH] D36770: DAG: Fix naming crime
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 15:44:39 PDT 2017
arsenm created this revision.
Herald added a subscriber: wdng.
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.
https://reviews.llvm.org/D36770
Files:
include/llvm/Target/TargetLowering.h
Index: include/llvm/Target/TargetLowering.h
===================================================================
--- include/llvm/Target/TargetLowering.h
+++ include/llvm/Target/TargetLowering.h
@@ -790,11 +790,10 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36770.111269.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170815/cd835876/attachment.bin>
More information about the llvm-commits
mailing list