Skip to content

Fix extra nonzero call for chained comparisons #1190

@kmod

Description

@kmod

See compare_ordering.py

The issue is that for chanined comparisons (a < b < c), we do something like:

def chained_compare(a, b, c):
  t1 = a < b
  if not bool(t1):
    return t1
  else:
    t2 = b < c
    nonzero(t2)
    return t2

Where that final nonzero(t2) call is extraneous and should be removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions