[all-commits] [llvm/llvm-project] d8cdd7: [RISCV] Add test cases to show missed opportunity ...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Aug 16 16:42:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8cdd78b6c04fb91ba5478b619d5076bc6868ebc
      https://github.com/llvm/llvm-project/commit/d8cdd78b6c04fb91ba5478b619d5076bc6868ebc
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-08-16 (Tue, 16 Aug 2022)

  Changed paths:
    M llvm/test/CodeGen/RISCV/double-select-fcmp.ll
    M llvm/test/CodeGen/RISCV/float-select-fcmp.ll
    M llvm/test/CodeGen/RISCV/half-select-fcmp.ll

  Log Message:
  -----------
  [RISCV] Add test cases to show missed opportunity to fold (sub C, (xor (setcc), 1)). NFC

(sub C, (xori X, 1)) can be folded to (add X, C-1) if X is 0 or 1.

This would avoid the xori and in some cases remove an instruction
neede to materialize the constant.




More information about the All-commits mailing list