[all-commits] [llvm/llvm-project] 47f910: [InstCombine] Guard against many users when swappi...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Feb 27 03:12:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47f9109dff80a1abbe2705ee71dc0882b1d62274
      https://github.com/llvm/llvm-project/commit/47f9109dff80a1abbe2705ee71dc0882b1d62274
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-02-27 (Mon, 27 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

  Log Message:
  -----------
  [InstCombine] Guard against many users when swapping icmp operands

This addresses the compile-time regression reported on D144369.
If we don't fold constant operands early, then we might end up
walking very large use lists of constants here. Explicitly exclude
constants, and also limit the number of inspected users to avoid
degenerate cases like this.

This entire transform shouldn't be part of InstCombine in the
first place though.




More information about the All-commits mailing list