[llvm-branch-commits] [llvm] ba00d9f - [LoongArch] Pre-commit test for #133225
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 1 16:07:30 PDT 2025
Author: wanglei
Date: 2025-04-01T16:07:12-07:00
New Revision: ba00d9f641e922684715e6364750bd722b4693d6
URL: https://github.com/llvm/llvm-project/commit/ba00d9f641e922684715e6364750bd722b4693d6
DIFF: https://github.com/llvm/llvm-project/commit/ba00d9f641e922684715e6364750bd722b4693d6.diff
LOG: [LoongArch] Pre-commit test for #133225
Reviewed By: SixWeining
Pull Request: https://github.com/llvm/llvm-project/pull/133224
(cherry picked from commit 725a7b664b92cd2e884806de5a08900b43d43cce)
Added:
Modified:
llvm/test/MC/LoongArch/Relocations/relocations.s
Removed:
################################################################################
diff --git a/llvm/test/MC/LoongArch/Relocations/relocations.s b/llvm/test/MC/LoongArch/Relocations/relocations.s
index 091dce200b7de..f6d2cc149cc0c 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]]:18: error: immediate must be an integer in the range [-2048, 2047]
+
+fst.d $ft1, $a0, %pc_lo12(foo)
+# ERROR: :[[#@LINE-1]]:18: 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
More information about the llvm-branch-commits
mailing list