[llvm-bugs] [Bug 47032] New: LHS and RHS of the logical binary-operator && are the same on line 483. It is a possible copy-pasted bug.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 7 03:09:34 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47032

            Bug ID: 47032
           Summary: LHS and RHS of the logical binary-operator && are the
                    same on line 483. It is a possible copy-pasted bug.
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: info at ustchcs.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

LHS and RHS of the logical binary-operator && are the same on line 483. It is a
possible copy-pasted bug.  

(commit e3546c78cabfbf670391a57766872f0a8e28a423)

llvm-project/llvm/utils/TableGen/CodeGenDAGPatterns.cpp:line 483



   483   if (any_of(S, isIntegerOrPtr) && any_of(S, isIntegerOrPtr)) {
   484        auto NotInt = [](MVT VT) { return !isIntegerOrPtr(VT); };
   485        Changed |= berase_if(S, NotInt);
   486        Changed |= berase_if(B, NotInt);
   487      } else if (any_of(S, isFloatingPoint) && any_of(B,
isFloatingPoint)) {
   488        auto NotFP = [](MVT VT) { return !isFloatingPoint(VT); };
   489        Changed |= berase_if(S, NotFP);
   490        Changed |= berase_if(B, NotFP);
   491      } else if (S.empty() || B.empty()) {
   492        Changed = !S.empty() || !B.empty();
   493        S.clear();
   494        B.clear();
   495      } else {
   496        TP.error("Incompatible types");
   497        return Changed;
   498      }

Reported by: Ustchcs Toolsets Bugfinder
(bugfinder-2.3: LHS and RHS of a logical binary-operator (&&, ||),
relational/equality binary-operator expression should not contain the same
sub-expression.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200807/c45ca3ae/attachment-0001.html>


More information about the llvm-bugs mailing list