[all-commits] [llvm/llvm-project] 667efa: [InstCombine] Fix fold of comparison of rotates (#...

Benji Smith via All-commits all-commits at lists.llvm.org
Sun Sep 13 11:59:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 667efaee701ae5345f4cde42f8b3e5b7f98549ee
      https://github.com/llvm/llvm-project/commit/667efaee701ae5345f4cde42f8b3e5b7f98549ee
  Author: Benji Smith <6193112+Benjins at users.noreply.github.com>
  Date:   2026-09-13 (Sun, 13 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-rotate.ll

  Log Message:
  -----------
  [InstCombine] Fix fold of comparison of rotates (#223263)

rotate(X, AmtX) == rotate(Y, AmtY) -> rotate(X, AmtX - AmtY) == Y

This fold is usually valid, but implicitly assumed that the bit width
was a power of two. This is now checked and the transform doesn't fire
if the bit width isn't a power of two.

Fixes https://github.com/llvm/llvm-project/issues/223262



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