[llvm] r325685 - [X86][MMX] Regenerate MMX PSUB commutation test
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 07:07:47 PST 2018
Author: rksimon
Date: Wed Feb 21 07:07:47 2018
New Revision: 325685
URL: http://llvm.org/viewvc/llvm-project?rev=325685&view=rev
Log:
[X86][MMX] Regenerate MMX PSUB commutation test
Modified:
llvm/trunk/test/CodeGen/X86/x86-64-psub.ll
Modified: llvm/trunk/test/CodeGen/X86/x86-64-psub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-64-psub.ll?rev=325685&r1=325684&r2=325685&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x86-64-psub.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x86-64-psub.ll Wed Feb 21 07:07:47 2018
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-pc-linux -mattr=mmx < %s | FileCheck %s
; MMX packed sub opcodes were wrongly marked as commutative.
@@ -8,6 +9,20 @@ declare { i64, double } @getFirstParam()
declare { i64, double } @getSecondParam()
define i64 @test_psubb() {
+; CHECK-LABEL: test_psubb:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubb %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -26,16 +41,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubb:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubb [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
define i64 @test_psubw() {
+; CHECK-LABEL: test_psubw:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubw %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -54,17 +74,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubw:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubw [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
-
define i64 @test_psubd() {
+; CHECK-LABEL: test_psubd:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubd %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -83,16 +107,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubd:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubd [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
define i64 @test_psubsb() {
+; CHECK-LABEL: test_psubsb:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubsb %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -111,16 +140,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubsb:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubsb [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
define i64 @test_psubswv() {
+; CHECK-LABEL: test_psubswv:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubsw %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -139,16 +173,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubswv:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubsw [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
define i64 @test_psubusbv() {
+; CHECK-LABEL: test_psubusbv:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubusb %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -167,16 +206,21 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubusbv:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubusb [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
define i64 @test_psubuswv() {
+; CHECK-LABEL: test_psubuswv:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rbx
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset %rbx, -16
+; CHECK-NEXT: callq getFirstParam
+; CHECK-NEXT: movq %rax, %rbx
+; CHECK-NEXT: callq getSecondParam
+; CHECK-NEXT: movq %rbx, %mm0
+; CHECK-NEXT: movq %rax, %mm1
+; CHECK-NEXT: psubusw %mm1, %mm0
+; CHECK-NEXT: movq %mm0, %rax
+; CHECK-NEXT: popq %rbx
+; CHECK-NEXT: retq
entry:
%call = tail call { i64, double } @getFirstParam()
%0 = extractvalue { i64, double } %call, 0
@@ -195,16 +239,6 @@ entry:
ret i64 %retval.0.extract.i15
}
-; CHECK-LABEL: test_psubuswv:
-; CHECK: callq getFirstParam
-; CHECK: movq %rax, [[TEMP:%[a-z0-9]+]]
-; CHECK: callq getSecondParam
-; CHECK: movq [[TEMP]], [[PARAM1:%[a-z0-9]+]]
-; CHECK: movq %rax, [[PARAM2:%[a-z0-9]+]]
-; CHECK: psubusw [[PARAM2]], [[PARAM1]]
-; CHECK: ret
-
-
declare x86_mmx @llvm.x86.mmx.psubus.w(x86_mmx, x86_mmx) nounwind readnone
declare x86_mmx @llvm.x86.mmx.psubus.b(x86_mmx, x86_mmx) nounwind readnone
More information about the llvm-commits
mailing list