Skip to content

[LoongArch] Pre-commit test for #133225 #133224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 28, 2025

Conversation

wangleiat
Copy link
Contributor

No description provided.

Created using spr 1.3.5-bogner
@llvmbot llvmbot added mc Machine (object) code backend:loongarch labels Mar 27, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 27, 2025

@llvm/pr-subscribers-mc

@llvm/pr-subscribers-backend-loongarch

Author: wanglei (wangleiat)

Changes

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

1 Files Affected:

  • (modified) llvm/test/MC/LoongArch/Relocations/relocations.s (+25)
diff --git a/llvm/test/MC/LoongArch/Relocations/relocations.s b/llvm/test/MC/LoongArch/Relocations/relocations.s
index 091dce200b7de..180eeaa3100fa 100644
--- a/llvm/test/MC/LoongArch/Relocations/relocations.s
+++ b/llvm/test/MC/LoongArch/Relocations/relocations.s
@@ -3,6 +3,9 @@
 # RUN: llvm-mc --filetype=obj --triple=loongarch64 < %s \
 # RUN:     | llvm-readobj -r - | FileCheck --check-prefix=RELOC %s
 
+# RUN: not llvm-mc --triple=loongarch64 --defsym=FIXME=1 < %s 2>&1 \
+# RUN:     | FileCheck --check-prefix=ERROR %s
+
 ## Check prefixes:
 ## RELOC - Check the relocation in the object.
 ## FIXUP - Check the fixup on the instruction.
@@ -308,3 +311,25 @@ pcaddi $t1, %desc_pcrel_20(foo)
 # RELOC: R_LARCH_TLS_DESC_PCREL20_S2 foo 0x0
 # INSTR: pcaddi $t1, %desc_pcrel_20(foo)
 # FIXUP: fixup A - offset: 0, value: %desc_pcrel_20(foo), kind: FK_NONE
+
+.ifdef FIXME
+
+fld.s $ft1, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
+
+fst.d $ft1, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
+
+vld $vr9, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:16: error: immediate must be an integer in the range [-2048, 2047]
+
+vst $vr9, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:16: error: immediate must be an integer in the range [-2048, 2047]
+
+xvld $xr9, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
+
+xvst $xr9, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
+
+.endif

@wangleiat wangleiat changed the title [LoongArch] Pre-commit test [LoongArch] Pre-commit test for #133225 Mar 27, 2025
@wangleiat wangleiat requested review from SixWeining and tangaac March 27, 2025 09:50
Created using spr 1.3.5-bogner
@wangleiat wangleiat merged commit 725a7b6 into main Mar 28, 2025
11 checks passed
@wangleiat wangleiat deleted the users/wangleiat/spr/loongarch-pre-commit-test branch March 28, 2025 02:21
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Mar 28, 2025
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Apr 1, 2025
Reviewed By: SixWeining

Pull Request: llvm#133224

(cherry picked from commit 725a7b6)
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 15, 2025
Reviewed By: SixWeining

Pull Request: llvm/llvm-project#133224

(cherry picked from commit 725a7b6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:loongarch mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants