[all-commits] [llvm/llvm-project] 8064ca: [PowerPC] Simplify fp-to-int store optimization

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Tue May 23 01:50:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8064caf83fb166b709bfe0e7641c5181341cb064
      https://github.com/llvm/llvm-project/commit/8064caf83fb166b709bfe0e7641c5181341cb064
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.h
    M llvm/lib/Target/PowerPC/PPCInstrInfo.td
    M llvm/lib/Target/PowerPC/PPCInstrP10.td
    M llvm/lib/Target/PowerPC/PPCInstrVSX.td
    M llvm/test/CodeGen/PowerPC/f128-truncateNconv.ll
    M llvm/test/CodeGen/PowerPC/scalar-double-ldst.ll
    M llvm/test/CodeGen/PowerPC/scalar-float-ldst.ll
    M llvm/test/CodeGen/PowerPC/store_fptoi.ll
    M llvm/test/CodeGen/PowerPC/vsx-partword-int-loads-and-stores.ll

  Log Message:
  -----------
  [PowerPC] Simplify fp-to-int store optimization

On PowerPC VSX targets, fp-to-int will be transformed into xscv with
mfvsr. When the result is to be stored, mfvsr can be replaced by a
direct store.

This change simplifies the optimization by using existing fp-to-int
code, which helps CSE and handling strictfp cases.

Reviewed By: shchenz

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




More information about the All-commits mailing list