[all-commits] [llvm/llvm-project] b359c8: [RISCV] Don't commute with shift if it would break...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Jan 6 03:23:42 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b359c84f3ad68457048740b3d259258d3722eeed
      https://github.com/llvm/llvm-project/commit/b359c84f3ad68457048740b3d259258d3722eeed
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-01-06 (Mon, 06 Jan 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/add_sext_shl_constant.ll
    M llvm/test/CodeGen/RISCV/add_shl_constant.ll

  Log Message:
  -----------
  [RISCV] Don't commute with shift if it would break sh{1,2,3}add pattern (#119527)

This fixes a regression from #101294 by checking if we might be
clobbering a sh{1,2,3}add pattern.

Only do this is the underlying add isn't going to be folded away into an
address offset.



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