[all-commits] [llvm/llvm-project] 2dda52: [AArch64] Fix Fold of Compare with Right-shifted V...

Marius Kamp via All-commits all-commits at lists.llvm.org
Mon Feb 17 09:44:30 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dda529838e622e7a79b1e26d2899f319fd7e379
      https://github.com/llvm/llvm-project/commit/2dda529838e622e7a79b1e26d2899f319fd7e379
  Author: Marius Kamp <msk at posteo.org>
  Date:   2025-02-17 (Mon, 17 Feb 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/shift-const-ne-0.ll

  Log Message:
  -----------
  [AArch64] Fix Fold of Compare with Right-shifted Value (#127209)

This change folds (setcc ne (lshr x c) 0) for 64-bit types and constants
c >= 32. This fold already existed for other types or smaller constants
but was not applicable to 64-bit types and constants >= 32 due to a
comparison of the constant c with the bit size of the setcc operation.
The type of this operation is legalized to i32, which does not
necessarily match the type of the lshr operation. Use the bit size of
the type of the lshr operation instead for the comparison.
    
Fixes #122380.



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