Skip to content

[X86] Codegen for one of 'absolute difference' patterns is suboptimal  #53045

@LebedevRI

Description

@LebedevRI

As being pointed out in halide/Halide#6545
we don't codegen a < b ? b - a : a - b as well as we do max(a, b) - min(a, b)
https://godbolt.org/z/MvMj9MPW9
https://alive2.llvm.org/ce/z/pVHePi

The question is, what do we think is more canonical in IR?

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