[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67302 >From a1567f579531c3abbd1f4e9b7c7edd2f95ead42c Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:10:51 +0800 Subject: [PATCH 1/7] [PowerPC] Implement llvm.set.rounding intrinsic According to

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-10 Thread Qiu Chaofan via cfe-commits
@@ -8900,6 +8900,82 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG &DAG) const { + SDLoc Dl(Op); + MachineFunction &MF = DAG.getMachi

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-10 Thread Qiu Chaofan via cfe-commits
ecnelises wrote: > Maybe we can do some perf test between this expansion for set rounding mode > and the system library's version for fesetround(). They are faster than system `fesetround` on both Linux and AIX. Linux glibc optimizes `fesetround` with faster `mffscrn` on P9, I just exploited t

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67302 >From a1567f579531c3abbd1f4e9b7c7edd2f95ead42c Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:10:51 +0800 Subject: [PATCH 1/6] [PowerPC] Implement llvm.set.rounding intrinsic According to

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-02 Thread Chen Zheng via cfe-commits
@@ -8900,6 +8900,82 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op, return FP; } +SDValue PPCTargetLowering::LowerSET_ROUNDING(SDValue Op, + SelectionDAG &DAG) const { + SDLoc Dl(Op); + MachineFunction &MF = DAG.getMachi

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2024-01-02 Thread Chen Zheng via cfe-commits
@@ -77,4 +77,196 @@ return: ; preds = %entry ret i32 %retval3 } -declare i32 @llvm.get.rounding() nounwind +define void @setrnd_tozero() { +; PPC32-LABEL: setrnd_tozero: +; PPC32: # %bb.0: # %entry +; PPC32-NEXT:mtfsb0 30 +; PPC32-NEXT:mtfsb1 3

[clang-tools-extra] [llvm] [clang] [PowerPC] Implement llvm.set.rounding intrinsic (PR #67302)

2023-11-27 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67302 >From a1567f579531c3abbd1f4e9b7c7edd2f95ead42c Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:10:51 +0800 Subject: [PATCH 1/4] [PowerPC] Implement llvm.set.rounding intrinsic According to