[all-commits] [llvm/llvm-project] 83c560: [SDAG] Prefer forming sign_extend for zext nneg pe...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Oct 30 15:30:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83c560b3bf46e9b5a65f9a41b60e21898e286c9c
      https://github.com/llvm/llvm-project/commit/83c560b3bf46e9b5a65f9a41b60e21898e286c9c
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/test/CodeGen/RISCV/sext-zext-trunc.ll

  Log Message:
  -----------
  [SDAG] Prefer forming sign_extend for zext nneg per target preference (#70725)

Builds on #67982 which recently introduced the nneg flag on a zext
instruction. Note that this change is the first point where the flag is
being used for an optimization, and thus may expose latent miscompiles.
We've recently taught both CVP and InstCombine to infer the flag when
forming zext, but nothing else is using the flag just yet.




More information about the All-commits mailing list