https://github.com/ecnelises updated
https://github.com/llvm/llvm-project/pull/85040
>From 4977659b16a7f220e1a738a0b9841102fe9f1d07 Mon Sep 17 00:00:00 2001
From: Qiu Chaofan
Date: Wed, 13 Mar 2024 15:46:51 +0800
Subject: [PATCH] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins
rldimi is
@@ -24,13 +24,17 @@ void test_trap(void) {
__tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid
range [1, 31]}}
}
+#ifdef __PPC64__
void test_builtin_ppc_rldimi() {
unsigned int shift;
unsigned long long mask;
unsigned long long res = __builti
@@ -5093,9 +5094,33 @@ bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo
&TI, unsigned BuiltinID,
case PPC::BI__builtin_ppc_rlwnm:
return SemaValueIsRunOfOnes(TheCall, 2);
case PPC::BI__builtin_ppc_rlwimi:
- case PPC::BI__builtin_ppc_rldimi:
return SemaBuil
@@ -24,13 +24,17 @@ void test_trap(void) {
__tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid
range [1, 31]}}
}
+#ifdef __PPC64__
void test_builtin_ppc_rldimi() {
unsigned int shift;
unsigned long long mask;
unsigned long long res = __builti
llvmbot wrote:
@llvm/pr-subscribers-backend-powerpc
Author: Qiu Chaofan (ecnelises)
Changes
rldimi is 64-bit instruction, so the corresponding builtin should not be
available in 32-bit mode. Also, clang should check if shift amount and mask are
consistent.
---
Full diff: https://github.
https://github.com/ecnelises created
https://github.com/llvm/llvm-project/pull/85040
rldimi is 64-bit instruction, so the corresponding builtin should not be
available in 32-bit mode. Also, clang should check if shift amount and mask are
consistent.
>From d5aa72a2d0ed083919b37cc1faacad1f3addc