[PATCH] D102275: [x86] try to use PCMPGT instead of not-of-PCMPEQ

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 07:15:37 PDT 2021


spatel added a comment.

In D102275#2753807 <https://reviews.llvm.org/D102275#2753807>, @spatel wrote:

> In D102275#2753333 <https://reviews.llvm.org/D102275#2753333>, @RKSimon wrote:
>
>> Is the inverse (known negative) case worth it do you think?
>
> Yes - I didn't draft that one yet to see if existing tests will show it, but we probably want that for symmetry. I'll look at that next.

I don't see a known-bits way to capture it. We need a `isKnownNotPositive` (if any non-sign-bit is set, then sign-bit is also set).
The Alive2 example you showed is correct because the result is always true. We want this instead:
https://alive2.llvm.org/ce/z/v7jxhL


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102275/new/

https://reviews.llvm.org/D102275



More information about the llvm-commits mailing list