Skip to content

Conversation

guy-david
Copy link
Contributor

@guy-david guy-david commented Jul 6, 2025

PPCSubtarget is not always initialized, depending on which passes are running, and in our downstream fork, -enable-matrix is the default configuration (regardless of whether matrix intrinsics are present in the IR), which triggers a fatal error in builtins-ppc-fpconstrained.c.

@guy-david guy-david requested a review from MaskRay July 6, 2025 12:23
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:PowerPC labels Jul 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 6, 2025

@llvm/pr-subscribers-backend-powerpc

@llvm/pr-subscribers-clang

Author: Guy David (guy-david)

Changes

This test does not fail because the PPCSubtarget was not initialized, and otherwise a fatal error occurs:
"SPE and traditional floating point cannot both be enabled.".

Tested by adding -mllvm -enable-matrix to the existing command-line.


Full diff: https://github.com/llvm/llvm-project/pull/147184.diff

1 Files Affected:

  • (modified) clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c (+1-1)
diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c b/clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c
index 838db02415fe5..b46fa9f2cf157 100644
--- a/clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c
+++ b/clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c
@@ -11,7 +11,7 @@
 // RUN: -S -ffp-exception-behavior=strict \
 // RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
 // RUN: --check-prefix=FIXME-CHECK  %s
-// RUN: %clang_cc1 -triple powerpcspe -ffp-exception-behavior=strict \
+// RUN: %clang_cc1 -triple powerpc -ffp-exception-behavior=strict \
 // RUN: -target-feature +vsx -fexperimental-strict-floating-point -emit-llvm \
 // RUN: %s -o - | FileCheck --check-prefix=CHECK-CONSTRAINED %s
 

@guy-david guy-david requested review from chenzheng1030, ecnelises, stefanp-synopsys and vitalybuka and removed request for MaskRay July 6, 2025 12:25
@vitalybuka vitalybuka removed their request for review July 9, 2025 17:32
PPCSubtarget is not always initialized, depending on which passes are running,
and in our downstream fork, -enable-matrix is the default configuration
(regardless of whether matrix intrinsics are present in the IR), which triggers
a fatal error in builtins-ppc-fpconstrained.c.
@guy-david guy-david force-pushed the users/guy-david/fix-builtins-ppc-fpconstrained.c branch from 7117889 to 3336929 Compare July 16, 2025 19:48
@guy-david guy-david requested a review from jroelofs July 16, 2025 19:49
@guy-david guy-david changed the title [PowerPC] Remove SPE from triple in VSX test [PowerPC] Test SPE incompatibility with VSX Jul 16, 2025
@guy-david guy-david merged commit cb6d1bb into main Jul 16, 2025
9 checks passed
@guy-david guy-david deleted the users/guy-david/fix-builtins-ppc-fpconstrained.c branch July 16, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:PowerPC clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants