[all-commits] [llvm/llvm-project] c752eb: [RISCV] Add test cases miscompile of (rotl (grevi ...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Mar 1 07:32:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c752eb4ae19710983500eef963e258b207e42df0
      https://github.com/llvm/llvm-project/commit/c752eb4ae19710983500eef963e258b207e42df0
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rv64zbp-intrinsic.ll

  Log Message:
  -----------
  [RISCV] Add test cases miscompile of (rotl (grevi X, 24), 16) on RV64. NFC

This pattern was moved from isel to DAG combine in D119527, but
it lost the RV32 qualification in the process.


  Commit: bf8054644de952179ffc54f430ecf221ef260282
      https://github.com/llvm/llvm-project/commit/bf8054644de952179ffc54f430ecf221ef260282
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/RISCV/neg-abs.ll

  Log Message:
  -----------
  [DAGCombiner] Don't expand (neg (abs x)) if the abs has an additional user.

If the types aren't legal, the expansions may get type legalized in a
different way preventing code sharing. If the type is legal, we will
share some instructions between the two expansions, but we will need an
extra register.

Since we don't appear to fold (neg (sub A, B)) if the sub has an
additional user, I think it makes sense not to expand NABS.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D120513


Compare: https://github.com/llvm/llvm-project/compare/a1f442b2787e...bf8054644de9


More information about the All-commits mailing list