[llvm] 54fe59e - [fastregalloc] Add test case for self loop (D125079).
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 01:10:28 PDT 2022
Author: Luo, Yuanke
Date: 2022-05-06T16:10:10+08:00
New Revision: 54fe59ef894c7d6cb9bc09144b4123fd1c9af23a
URL: https://github.com/llvm/llvm-project/commit/54fe59ef894c7d6cb9bc09144b4123fd1c9af23a
DIFF: https://github.com/llvm/llvm-project/commit/54fe59ef894c7d6cb9bc09144b4123fd1c9af23a.diff
LOG: [fastregalloc] Add test case for self loop (D125079).
Added:
llvm/test/CodeGen/X86/fastregalloc-selfloop.mir
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/fastregalloc-selfloop.mir b/llvm/test/CodeGen/X86/fastregalloc-selfloop.mir
new file mode 100644
index 000000000000..ff32f8b10b97
--- /dev/null
+++ b/llvm/test/CodeGen/X86/fastregalloc-selfloop.mir
@@ -0,0 +1,32 @@
+# RUN: llc -mtriple=x86_64-- -run-pass=regallocfast -o - %s | FileCheck %s
+
+...
+---
+name: foo
+alignment: 16
+tracksRegLiveness: true
+registers:
+ - { id: 0, class: vr128 }
+frameInfo:
+ maxAlignment: 16
+stack:
+ - { id: 0, size: 64, alignment: 16 }
+machineFunctionInfo: {}
+body: |
+ bb.0.entry:
+ ; CHECK: renamable $xmm1 = V_SET0
+ ; CHECK-NEXT: renamable $xmm0 = V_SET0
+ ; CHECK-NEXT: renamable $xmm1 = PXORrr renamable $xmm1, renamable $xmm0
+ ; CHECK-NEXT: MOVAPSmr %stack.1, 1, $noreg, 0, $noreg, $xmm1 :: (store (s128) into %stack.1)
+ ; CHECK-NEXT: MOVAPSmr %stack.0, 1, $noreg, 0, $noreg, renamable $xmm1
+ ; CHECK-NEXT: MOVAPSmr %stack.0, 1, $noreg, 16, $noreg, killed renamable $xmm0
+
+ %0:vr128 = V_SET0
+ %1:vr128 = V_SET0
+ %0:vr128 = PXORrr %0, %1
+ MOVAPSmr %stack.0, 1, $noreg, 0, $noreg, %0
+ MOVAPSmr %stack.0, 1, $noreg, 16, $noreg, %1
+ JMP_1 %bb.0.entry
+ RET 0
+
+...
More information about the llvm-commits
mailing list