1 ; RUN: llc < %s -march=x86 -mcpu=nehalem | FileCheck %s 2 3 define <4 x i32> @signd(<4 x i32> %a, <4 x i32> %b) nounwind { 4 entry: 5 ; CHECK: signd: 6 ; CHECK: psignd 7 ; CHECK-NOT: sub 8 ; CHECK: ret 9 %b.lobit = ashr <4 x i32> %b, <i32 31, i32 31, i32 31, i32 31> 10 %sub = sub nsw <4 x i32> zeroinitializer, %a 11 %0 = xor <4 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1> 12 %1 = and <4 x i32> %a, %0 13 %2 = and <4 x i32> %b.lobit, %sub 14 %cond = or <4 x i32> %1, %2 15 ret <4 x i32> %cond 16 } 17 18 define <4 x i32> @blendvb(<4 x i32> %b, <4 x i32> %a, <4 x i32> %c) nounwind { 19 entry: 20 ; CHECK: blendvb: 21 ; CHECK: pblendvb 22 ; CHECK: ret 23 %b.lobit = ashr <4 x i32> %b, <i32 31, i32 31, i32 31, i32 31> 24 %sub = sub nsw <4 x i32> zeroinitializer, %a 25 %0 = xor <4 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1> 26 %1 = and <4 x i32> %c, %0 27 %2 = and <4 x i32> %a, %b.lobit 28 %cond = or <4 x i32> %1, %2 29 ret <4 x i32> %cond 30 } 31