[PATCH] D88098: [SVE] Add new isKnownXX comparison functions to TypeSize
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 09:04:39 PDT 2020
paulwalker-arm added inline comments.
================
Comment at: llvm/include/llvm/Support/TypeSize.h:200-205
+ static bool isKnownLE(const TypeSize &LHS, const TypeSize &RHS) {
+ if (!LHS.IsScalable || RHS.IsScalable) return LHS.MinSize <= RHS.MinSize;
+
+ // LHS.IsScalable = true, RHS.IsScalable = false
+ return false;
+ }
----------------
paulwalker-arm wrote:
> I'm happy with this but wondered if the following might reduce the complexity.
> ```
> return isKnownLT(LHS, RHS) || isKnownEQ(LHS, RHS);
> ```
>
As discussed, I can see that my suggestion actually covers less cases, so is not the way to go.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88098/new/
https://reviews.llvm.org/D88098
More information about the llvm-commits
mailing list