aboutsummaryrefslogtreecommitdiff
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/LoongArch/merge-offset-option.ll24
-rw-r--r--llvm/test/CodeGen/X86/avx512-mask-op.ll6
2 files changed, 26 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/LoongArch/merge-offset-option.ll b/llvm/test/CodeGen/LoongArch/merge-offset-option.ll
new file mode 100644
index 0000000..e5351a6
--- /dev/null
+++ b/llvm/test/CodeGen/LoongArch/merge-offset-option.ll
@@ -0,0 +1,24 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc --mtriple=loongarch64 -mattr=+d --relocation-model=static -O1 \
+; RUN: < %s | FileCheck %s --check-prefix=MERGE
+; RUN: llc --mtriple=loongarch64 -mattr=+d --relocation-model=static -O1 \
+; RUN: --loongarch-enable-merge-offset=false < %s | FileCheck %s --check-prefix=NO_MERGE
+
+@g = dso_local global i32 zeroinitializer, align 4
+
+define void @foo() nounwind {
+; MERGE-LABEL: foo:
+; MERGE: # %bb.0:
+; MERGE-NEXT: pcalau12i $a0, %pc_hi20(g)
+; MERGE-NEXT: ld.w $zero, $a0, %pc_lo12(g)
+; MERGE-NEXT: ret
+;
+; NO_MERGE-LABEL: foo:
+; NO_MERGE: # %bb.0:
+; NO_MERGE-NEXT: pcalau12i $a0, %pc_hi20(g)
+; NO_MERGE-NEXT: addi.d $a0, $a0, %pc_lo12(g)
+; NO_MERGE-NEXT: ld.w $zero, $a0, 0
+; NO_MERGE-NEXT: ret
+ %v = load volatile i32, ptr @g
+ ret void
+}
diff --git a/llvm/test/CodeGen/X86/avx512-mask-op.ll b/llvm/test/CodeGen/X86/avx512-mask-op.ll
index 8aa898f..da0cef0 100644
--- a/llvm/test/CodeGen/X86/avx512-mask-op.ll
+++ b/llvm/test/CodeGen/X86/avx512-mask-op.ll
@@ -2119,8 +2119,7 @@ define void @ktest_1(<8 x double> %in, ptr %base) {
; KNL-LABEL: ktest_1:
; KNL: ## %bb.0:
; KNL-NEXT: vcmpgtpd (%rdi), %zmm0, %k1
-; KNL-NEXT: vmovupd 8(%rdi), %zmm1 {%k1} {z}
-; KNL-NEXT: vcmpltpd %zmm1, %zmm0, %k0 {%k1}
+; KNL-NEXT: vcmpltpd 8(%rdi), %zmm0, %k0 {%k1}
; KNL-NEXT: kmovw %k0, %eax
; KNL-NEXT: testb %al, %al
; KNL-NEXT: je LBB44_2
@@ -2152,8 +2151,7 @@ define void @ktest_1(<8 x double> %in, ptr %base) {
; AVX512BW-LABEL: ktest_1:
; AVX512BW: ## %bb.0:
; AVX512BW-NEXT: vcmpgtpd (%rdi), %zmm0, %k1
-; AVX512BW-NEXT: vmovupd 8(%rdi), %zmm1 {%k1} {z}
-; AVX512BW-NEXT: vcmpltpd %zmm1, %zmm0, %k0 {%k1}
+; AVX512BW-NEXT: vcmpltpd 8(%rdi), %zmm0, %k0 {%k1}
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: testb %al, %al
; AVX512BW-NEXT: je LBB44_2