[all-commits] [llvm/llvm-project] c9832d: [CGP] Drop nneg flag when moving zext past instruc...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Nov 14 00:03:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9832da35092e8733d505a4856f2b3dca5bd05b1
      https://github.com/llvm/llvm-project/commit/c9832da35092e8733d505a4856f2b3dca5bd05b1
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/Transforms/CodeGenPrepare/X86/multi-extension.ll
    A llvm/test/Transforms/CodeGenPrepare/X86/pr72046.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/promoted-trunc-loc.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/promoted-zext-debugloc.ll

  Log Message:
  -----------
  [CGP] Drop nneg flag when moving zext past instruction (#72103)

Fix the issue by not reusing the zext at all. The code already handles
creation of new zexts if more than one is needed. Always use that
code-path instead of trying to reuse the old zext in some case.
(Alternatively we could also drop poison-generating flags on the old
zext, but it seems cleaner to not reuse it at all, especially if it's
not always possible anyway.)

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




More information about the All-commits mailing list