[PATCH] D103280: [SDAG] try harder to fold casts into vector compare

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 05:35:50 PDT 2021


spatel added a comment.

In D103280#2786791 <https://reviews.llvm.org/D103280#2786791>, @lebedev.ri wrote:

> One more random thought: should this be guarded with a check that `getBooleanContents(N00VT) == ZeroOrNegativeOneBooleanContent` ?

Yes, we need that check. It's already there with some others at line 10913:

  if (VT.isVector() && !LegalOperations &&
      TLI.getBooleanContents(N00VT) ==
          TargetLowering::ZeroOrNegativeOneBooleanContent) {

...this comment suggests that I should move this all into a helper because it's too big to read. That's why I had the redundant local variables in the earlier draft - I started by pulling it out, but got lazy. :)


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

https://reviews.llvm.org/D103280



More information about the llvm-commits mailing list