[PATCH] D23282: [IR/GlobalISel] move compare predicates into lib/Support
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 14:59:56 PDT 2016
t.p.northover added a comment.
Just noticed a couple of issues myself:
================
Comment at: include/llvm/IR/Instructions.h:1157
@@ -1182,11 +1156,3 @@
/// tests for commutativity.
- static bool isEquality(Predicate P) {
- return P == ICMP_EQ || P == ICMP_NE;
- }
-
- /// isEquality - Return true if this predicate is either EQ or NE. This also
- /// tests for commutativity.
- bool isEquality() const {
- return isEquality(getPredicate());
- }
+ bool isEquality() const { return getPredicate().isEquality(); }
----------------
Just noticed these are redundant now. I'll remove them.
================
Comment at: lib/IR/ConstantFold.cpp:1688
@@ -1685,3 +1687,3 @@
// Fold FCMP_FALSE/FCMP_TRUE unconditionally.
- if (pred == FCmpInst::FCMP_FALSE)
+ if (Pred.getKind() == Predicate::FCMP_FALSE)
return Constant::getNullValue(ResultTy);
----------------
Sorry, these `getKind` calls are are unnecessary (from an earlier version of the Predicate class). I'll remove them too.
Repository:
rL LLVM
https://reviews.llvm.org/D23282
More information about the llvm-commits
mailing list