[all-commits] [llvm/llvm-project] ffa2dc: [PowerPC] Fix FLT_ROUNDS_ on little endian

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Wed Dec 2 01:21:41 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ffa2dce59070636e0d83d2797fb80c4ca2d7ea2d
      https://github.com/llvm/llvm-project/commit/ffa2dce59070636e0d83d2797fb80c4ca2d7ea2d
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2020-12-02 (Wed, 02 Dec 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/frounds.ll

  Log Message:
  -----------
  [PowerPC] Fix FLT_ROUNDS_ on little endian

In lowering of FLT_ROUNDS_, FPSCR content will be moved into FP register
and then GPR, and then truncated into word.

For subtargets without direct move support, it will store and then load.
The load address needs adjustment (+4) only on big-endian targets. This
patch fixes it on using generic opcodes on little-endian and subtargets
with direct-move.

Reviewed By: steven.zhang

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




More information about the All-commits mailing list