Skip to content

Commit cb6d1bb

Browse files
authored
[PowerPC] Test SPE incompatibility with VSX (#147184)
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.
1 parent b7f6abd commit cb6d1bb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// RUN: -S -ffp-exception-behavior=strict \
1212
// RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
1313
// RUN: --check-prefix=FIXME-CHECK %s
14-
// RUN: %clang_cc1 -triple powerpcspe -ffp-exception-behavior=strict \
14+
// RUN: %clang_cc1 -triple powerpc -ffp-exception-behavior=strict \
1515
// RUN: -target-feature +vsx -fexperimental-strict-floating-point -emit-llvm \
1616
// RUN: %s -o - | FileCheck --check-prefix=CHECK-CONSTRAINED %s
1717

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
; Adding -enable-matrix, which is disabled by default, forces the initialization
2+
; of the PPCSubtarget which verifies the incompatible CPU features.
3+
; RUN: not llc -mtriple=powerpcspe -mattr=+vsx -enable-matrix < %s 2>&1 | FileCheck %s
4+
5+
; CHECK: SPE and traditional floating point cannot both be enabled
6+
define void @test() {
7+
ret void
8+
}

0 commit comments

Comments
 (0)