[all-commits] [llvm/llvm-project] ddf167: [GlobalISel] Fix G_ZEXTLOAD being converted to G_S...

Amara Emerson via All-commits all-commits at lists.llvm.org
Sat Feb 18 10:05:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ddf167c442018e807819aa0b2e56546977870333
      https://github.com/llvm/llvm-project/commit/ddf167c442018e807819aa0b2e56546977870333
  Author: Amara Emerson <amara at apple.com>
  Date:   2023-02-18 (Sat, 18 Feb 2023)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-extending-loads.mir

  Log Message:
  -----------
  [GlobalISel] Fix G_ZEXTLOAD being converted to G_SEXTLOAD incorrectly.

The extending loads combine tries to prefer sign-extends folding into loads vs
zexts, and in cases where a G_ZEXTLOAD is first used by a G_ZEXT, and then used
by a G_SEXT, it would select the G_SEXT even though the load is already
zero-extending.

Fixes issue #59630




More information about the All-commits mailing list