[all-commits] [llvm/llvm-project] 4f2263: [DAG] Don't detect flippable signs in MinMax match...

Luke Lau via All-commits all-commits at lists.llvm.org
Wed Sep 23 10:47:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f22636ba6d33280d2609206b281c88a66a65997
      https://github.com/llvm/llvm-project/commit/4f22636ba6d33280d2609206b281c88a66a65997
  Author: Luke Lau <luke at igalia.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M llvm/include/llvm/CodeGen/SDPatternMatch.h
    M llvm/test/CodeGen/AArch64/abds.ll
    M llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp

  Log Message:
  -----------
  [DAG] Don't detect flippable signs in MinMax matchers (#220527)

The Min/MaxLike pattern matchers are the only pattern matchers that use
computeKnownBits. They're used to match a smax as a umax if the operands
are known positive and so forth.

However in practice it has no affect on real-world codegen as correlated
value propagation already does this transform earlier in the pipeline,
including for all the tests changed in this PR:
https://llvm.godbolt.org/z/Pr4Ec1xrv

Nothing in the backends will emit a min/max that needs re-transformed in
this way as far as I'm aware.

Removing computeKnownBits from these matchers allows us to remove the
match context in #218372, and saves some compilation time at O3
https://llvm-compile-time-tracker.com/compare.php?from=2f2aa940de68abcdfe4959ddd3b9a0741a7c2a16&to=b771556fb2a7e9c2cb0c853a4a71ea9641e5ede0&stat=instructions:u



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list