[llvm] r295819 - [X86] Regenerate CSE test with codegen instead of just the instruction count
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 02:12:47 PST 2017
Author: rksimon
Date: Wed Feb 22 04:12:46 2017
New Revision: 295819
URL: http://llvm.org/viewvc/llvm-project?rev=295819&view=rev
Log:
[X86] Regenerate CSE test with codegen instead of just the instruction count
Modified:
llvm/trunk/test/CodeGen/X86/dagcombine-cse.ll
Modified: llvm/trunk/test/CodeGen/X86/dagcombine-cse.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dagcombine-cse.ll?rev=295819&r1=295818&r2=295819&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/dagcombine-cse.ll (original)
+++ llvm/trunk/test/CodeGen/X86/dagcombine-cse.ll Wed Feb 22 04:12:46 2017
@@ -1,7 +1,42 @@
-; REQUIRES: asserts
-; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -stats 2>&1 | grep asm-printer | grep 13
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 | FileCheck %s --check-prefix=X32
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 | FileCheck %s --check-prefix=X64
define i32 @t(i8* %ref_frame_ptr, i32 %ref_frame_stride, i32 %idxX, i32 %idxY) nounwind {
+; X32-LABEL: t:
+; X32: ## BB#0: ## %entry
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-NEXT: imull {{[0-9]+}}(%esp), %ecx
+; X32-NEXT: addl {{[0-9]+}}(%esp), %ecx
+; X32-NEXT: movzwl 4(%eax,%ecx), %edx
+; X32-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
+; X32-NEXT: movd %edx, %xmm1
+; X32-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
+; X32-NEXT: pxor %xmm1, %xmm1
+; X32-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,1,1,2,4,5,6,7]
+; X32-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
+; X32-NEXT: movd %xmm0, %eax
+; X32-NEXT: retl
+;
+; X64-LABEL: t:
+; X64: ## BB#0: ## %entry
+; X64-NEXT: ## kill: %EDX<def> %EDX<kill> %RDX<def>
+; X64-NEXT: ## kill: %ESI<def> %ESI<kill> %RSI<def>
+; X64-NEXT: imull %ecx, %esi
+; X64-NEXT: leal (%rsi,%rdx), %eax
+; X64-NEXT: cltq
+; X64-NEXT: leal 4(%rsi,%rdx), %ecx
+; X64-NEXT: movslq %ecx, %rcx
+; X64-NEXT: movzwl (%rdi,%rcx), %ecx
+; X64-NEXT: shlq $32, %rcx
+; X64-NEXT: movl (%rdi,%rax), %eax
+; X64-NEXT: orq %rcx, %rax
+; X64-NEXT: movd %rax, %xmm0
+; X64-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
+; X64-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,1,1,2,4,5,6,7]
+; X64-NEXT: movd %xmm0, %eax
+; X64-NEXT: retq
entry:
%tmp7 = mul i32 %idxY, %ref_frame_stride ; <i32> [#uses=2]
%tmp9 = add i32 %tmp7, %idxX ; <i32> [#uses=1]
More information about the llvm-commits
mailing list