@@ -68,10 +68,10 @@ extern __inline __m128d
__asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
__enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
#else
-__fpscr_save.__fr = __builtin_mffs();
+__fpscr_save.__fr = __builtin_ppc_mffs();
https://github.com/stefanp-ibm edited
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/stefanp-ibm approved this pull request.
I'm going to approve this patch.
I don't think that removing the mask `__fpscr_save.__fpscr &= 0x70007f0ffL;`
in `smmintrin.h` with have issues but I don't feel strongly enough about it to
block this patch. If you are not convinced
@@ -68,10 +68,10 @@ extern __inline __m128d
__asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
__enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
#else
-__fpscr_save.__fr = __builtin_mffs();
+__fpscr_save.__fr = __builtin_ppc_mffs();
ecnelises
https://github.com/stefanp-ibm edited
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/stefanp-ibm commented:
With respect to the comment from Nemanja I'm okay with this not being 100% the
same as GCC. I'm sure we will get questions in the future but really we should
discourage the use of `__builtin_mffsl` on pre-Power 9.
stefanp-ibm wrote:
> I personally prefer this solution. @stefanp-ibm What do you think?
>
> LGTM
I understand your point about forcing users to just use `mffs` when `mffsl` is
not available. If that's the case do we also want to change this:
```
#ifdef _ARCH_PWR9
__fpscr_save.__fr =
https://github.com/ecnelises updated
https://github.com/llvm/llvm-project/pull/67299
>From 2d628587b9cede36e7a93ecb1414cc0c16596934 Mon Sep 17 00:00:00 2001
From: Qiu Chaofan
Date: Mon, 25 Sep 2023 17:06:26 +0800
Subject: [PATCH 1/3] [PowerPC] Fix use of FPSCR builtins in smmintrin.h
@@ -11595,6 +11595,50 @@ SDValue PPCTargetLowering::LowerFP_EXTEND(SDValue Op,
SelectionDAG ) const {
llvm_unreachable("ERROR:Should return for all cases within swtich.");
}
+// Lower mffsl intrinsic with mffs in targets without ISA 3.0
+static SDValue lowerMFFSL(SDValue
@@ -11595,6 +11595,50 @@ SDValue PPCTargetLowering::LowerFP_EXTEND(SDValue Op,
SelectionDAG ) const {
llvm_unreachable("ERROR:Should return for all cases within swtich.");
}
+// Lower mffsl intrinsic with mffs in targets without ISA 3.0
+static SDValue lowerMFFSL(SDValue
@@ -219,9 +234,14 @@ extern __inline __m128
*/
__asm__("" : : "wa"(__r));
/* Restore enabled exceptions. */
-__fpscr_save.__fr = __builtin_mffsl();
+#ifdef _ARCH_PWR9
+__fpscr_save.__fr = __builtin_ppc_mffsl();
+#else
+__fpscr_save.__fr =
https://github.com/ecnelises updated
https://github.com/llvm/llvm-project/pull/67299
>From 2d628587b9cede36e7a93ecb1414cc0c16596934 Mon Sep 17 00:00:00 2001
From: Qiu Chaofan
Date: Mon, 25 Sep 2023 17:06:26 +0800
Subject: [PATCH 1/2] [PowerPC] Fix use of FPSCR builtins in smmintrin.h
@@ -68,10 +68,10 @@ extern __inline __m128d
__asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
__enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
#else
-__fpscr_save.__fr = __builtin_mffs();
+__fpscr_save.__fr = __builtin_ppc_mffs();
ecnelises
https://github.com/stefanp-ibm edited
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -68,10 +68,10 @@ extern __inline __m128d
__asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
__enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
#else
-__fpscr_save.__fr = __builtin_mffs();
+__fpscr_save.__fr = __builtin_ppc_mffs();
@@ -219,9 +234,14 @@ extern __inline __m128
*/
__asm__("" : : "wa"(__r));
/* Restore enabled exceptions. */
-__fpscr_save.__fr = __builtin_mffsl();
+#ifdef _ARCH_PWR9
+__fpscr_save.__fr = __builtin_ppc_mffsl();
+#else
+__fpscr_save.__fr =
https://github.com/stefanp-ibm commented:
I think this makes sense to me overall.
Thank you for adding the tests for C++ as well!
I only had a couple of comments about this patch.
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits
JeremyRand wrote:
ACK 5abcf8964394eb5124d606b00a94781147fd8f8d. I can confirm that this fixes
SSE4.1 support in [ncnn](https://github.com/Tencent/ncnn) for POWER9 LE (and
gives a nice 3x speedup when benchmarking ncnn, which indicates that the
additional intrinsics are actually getting used).
https://github.com/ecnelises edited
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Changes
smmintrin.h uses __builtin_mffs, __builtin_mffsl, __builtin_mtfsf and
__builtin_set_fpscr_rn. This patch replaces the uses with ppc prefix and
implement the missing ones.
This fixes issue #64664.
Migrated from
https://github.com/ecnelises edited
https://github.com/llvm/llvm-project/pull/67299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ecnelises created
https://github.com/llvm/llvm-project/pull/67299
smmintrin.h uses __builtin_mffs, __builtin_mffsl, __builtin_mtfsf and
__builtin_set_fpscr_rn. This patch replaces the uses with ppc prefix and
implement the missing ones.
This fixes issue #64664.
>From
22 matches
Mail list logo