~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/commuted-blend-mask.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 < %s | FileCheck %s
 
2
 
 
3
; When commuting the operands of a SSE blend, make sure that the resulting blend
 
4
; mask can be encoded as a imm8.
 
5
; Before, when commuting the operands to the shuffle in function @test, the backend
 
6
; produced the following assembly:
 
7
;   pblendw $4294967103, %xmm1, %xmm0
 
8
 
 
9
define <4 x i32> @test(<4 x i32> %a, <4 x i32> %b) {
 
10
  ;CHECK: pblendw $63, %xmm1, %xmm0
 
11
  %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 5, i32 6, i32 3>
 
12
  ret <4 x i32> %shuffle
 
13
}