Skip to content

Conversation

@lei137
Copy link
Contributor

@lei137 lei137 commented Nov 26, 2025

Based on the RUN lines, there is actually no need for different versions of these error files since no cpu specific
option needed. Combine to reduce confusion and maintenance as these are not huge files.

@lei137 lei137 requested a review from maryammo November 26, 2025 15:59
@lei137 lei137 self-assigned this Nov 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 26, 2025

@llvm/pr-subscribers-backend-powerpc

Author: Lei Huang (lei137)

Changes

Based on the RUN lines, there is actually no need for different versions of these error files since no cpu specific
option needed. Combine to reduce confusion and maintenance as these are not huge files.


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

2 Files Affected:

  • (removed) llvm/test/MC/PowerPC/ppc64-encoding-ISA31-errors.s (-71)
  • (modified) llvm/test/MC/PowerPC/ppc64-errors.s (+65)
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-ISA31-errors.s b/llvm/test/MC/PowerPC/ppc64-encoding-ISA31-errors.s
deleted file mode 100644
index 69cdb5cb75ebb..0000000000000
--- a/llvm/test/MC/PowerPC/ppc64-encoding-ISA31-errors.s
+++ /dev/null
@@ -1,71 +0,0 @@
-# RUN: not llvm-mc -triple powerpc64-unknown-unknown < %s 2> %t
-# RUN: FileCheck < %t %s
-# RUN: not llvm-mc -triple powerpc64le-unknown-unknown < %s 2> %t
-# RUN: FileCheck < %t %s
-
- # CHECK: error: invalid operand for instruction
-paddi 1, 1, 32, 1
-
-# CHECK: error: invalid operand for instruction
-pld 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-paddi 1, 1, 32, 1
-
-# CHECK: error: invalid operand for instruction
-plbz 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plfd 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plfs 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plha 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plhz 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plwa 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plwz 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plxsd 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plxssp 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-plxv 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstb 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstd 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstfd 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstfs 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-psth 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstw 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstxsd 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstxssp 1, 32(1), 1
-
-# CHECK: error: invalid operand for instruction
-pstxv 1, 32(1), 1
-
diff --git a/llvm/test/MC/PowerPC/ppc64-errors.s b/llvm/test/MC/PowerPC/ppc64-errors.s
index 17905a396885a..8598174300e42 100644
--- a/llvm/test/MC/PowerPC/ppc64-errors.s
+++ b/llvm/test/MC/PowerPC/ppc64-errors.s
@@ -4,6 +4,71 @@
 # RUN: not llvm-mc -triple powerpc64le-unknown-unknown < %s 2> %t
 # RUN: FileCheck < %t %s
 
+# From ISA31
+
+# CHECK: error: invalid operand for instruction
+paddi 1, 1, 32, 1
+
+# CHECK: error: invalid operand for instruction
+pld 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plbz 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plfd 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plfs 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plha 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plhz 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plwa 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plwz 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plxsd 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plxssp 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+plxv 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstb 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstd 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstfd 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstfs 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+psth 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstw 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstxsd 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstxssp 1, 32(1), 1
+
+# CHECK: error: invalid operand for instruction
+pstxv 1, 32(1), 1
+
 # Register operands
 
 # CHECK: error: invalid operand for instruction

Copy link
Contributor

@maryammo maryammo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@lei137 lei137 merged commit b78b5ba into llvm:main Nov 26, 2025
12 checks passed
tanji-dg pushed a commit to tanji-dg/llvm-project that referenced this pull request Nov 27, 2025
Based on the RUN lines, there is actually no need for different versions
of these error files since no cpu specific
option needed. Combine to reduce confusion and maintenance as these are
not huge files.
GeneraluseAI pushed a commit to GeneraluseAI/llvm-project that referenced this pull request Nov 27, 2025
Based on the RUN lines, there is actually no need for different versions
of these error files since no cpu specific
option needed. Combine to reduce confusion and maintenance as these are
not huge files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants