[all-commits] [llvm/llvm-project] 27084f: [InstCombine] Add tests for folding `(icmp eq/ne (...

goldsteinn via All-commits all-commits at lists.llvm.org
Fri Jun 7 13:07:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27084f73e3b51fa507d1459042eb73e4f7098d73
      https://github.com/llvm/llvm-project/commit/27084f73e3b51fa507d1459042eb73e4f7098d73
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-06-07 (Fri, 07 Jun 2024)

  Changed paths:
    M llvm/test/Transforms/InstCombine/icmp-equality-xor.ll

  Log Message:
  -----------
  [InstCombine] Add tests for folding `(icmp eq/ne (xor x, C0), C1)`; NFC


  Commit: 166c1849d6da1577b49305371db1cdfacbb150e4
      https://github.com/llvm/llvm-project/commit/166c1849d6da1577b49305371db1cdfacbb150e4
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-06-07 (Fri, 07 Jun 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-equality-xor.ll
    M llvm/test/Transforms/InstCombine/icmp-or.ll
    M llvm/test/Transforms/InstCombine/prevent-cmp-merge.ll
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] Fold `(icmp eq/ne (xor x, y), C1)` even if multiuse

Two folds unlocked:
    `(icmp eq/ne (xor x, C0), C1)` -> `(icmp eq/ne x, C2)`
    `(icmp eq/ne (xor x, y), 0)` -> `(icmp eq/ne x, y)`

This fixes regressions assosiated with #87180

Closes #87275


Compare: https://github.com/llvm/llvm-project/compare/c6e9371cbd23...166c1849d6da

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