<div dir="ltr">Reverted in r279782.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 24, 2016 at 11:33 AM, Michael Kuperstein <span dir="ltr"><<a href="mailto:mkuper@google.com" target="_blank">mkuper@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Elena,<div><br></div><div>It looks like this is causing at least some of the issues in PR29112.</div><div>Unfortunately, I don't see a simple fix that won't just reintroduce the ands. Do you have something in mind? If not, I'd prefer to revert this for now.</div><div>What do you think?</div><div><br></div><div>Thanks,</div><div> Michael</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 2:01 AM, Elena Demikhovsky via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: delena<br>
Date: Wed Jul 6 04:01:20 2016<br>
New Revision: 274613<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=274613&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=274613&view=rev</a><br>
Log:<br>
AVX-512: Optimization for patterns with i1 scalar type<br>
<br>
The patch removes redundant kmov instructions (not all, we still have a lot of work here) and redundant "and" instructions after "setcc".<br>
I use "AssertZero" marker between X86ISD::SETCC node and "truncate" to eliminate extra "and $1" instruction.<br>
I also changed zext, aext and trunc patterns in the .td file. It allows to remove extra "kmov" instruictions.<br>
<br>
This patch fixes <a href="https://llvm.org/bugs/show_bug.cgi?id=28173" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug<wbr>.cgi?id=28173</a>.<br>
<br>
Fast ISEL mode is not supported correctly for AVX-512. ICMP/FCMP scalar instruction should return result in k-reg. It will be fixed in one of the next patches. I redirected handling of "cmp" to the DAG builder mode. (The code looks worse in one specific test case, but without this fix the new patch fails).<br>
<br>
Differential revision: <a href="http://reviews.llvm.org/D21956" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21956</a><br>
<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/X86/X86F<wbr>astISel.cpp<br>
llvm/trunk/lib/Target/X86/X86I<wbr>SelLowering.cpp<br>
llvm/trunk/lib/Target/X86/X86I<wbr>nstrAVX512.td<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512-cmp.ll<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512-ext.ll<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512-insert-extract.ll<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512-intrinsics.ll<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512-mask-op.ll<br>
llvm/trunk/test/CodeGen/X86/av<wbr>x512dq-intrinsics.ll<br>
llvm/trunk/test/CodeGen/X86/ma<wbr>sked_gather_scatter.ll<br>
llvm/trunk/test/CodeGen/X86/pr<wbr>27591.ll<br>
llvm/trunk/test/CodeGen/X86/pr<wbr>28173.ll<br>
llvm/trunk/test/CodeGen/X86/xa<wbr>luo.ll<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86F<wbr>astISel.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Target/X8<wbr>6/X86FastISel.cpp?rev=274613&<wbr>r1=274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/X86/X86F<wbr>astISel.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86F<wbr>astISel.cpp Wed Jul 6 04:01:20 2016<br>
@@ -1404,6 +1404,9 @@ bool X86FastISel::X86SelectCmp(cons<wbr>t Ins<br>
if (!isTypeLegal(I->getOperand(0)<wbr>->getType(), VT))<br>
return false;<br>
<br>
+ if (I->getType()->isIntegerTy(1) && Subtarget->hasAVX512())<br>
+ return false;<br>
+<br>
// Try to optimize or fold the cmp.<br>
CmpInst::Predicate Predicate = optimizeCmpPredicate(CI);<br>
unsigned ResultReg = 0;<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86I<wbr>SelLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Target/X8<wbr>6/X86ISelLowering.cpp?rev=2746<wbr>13&r1=274612&r2=274613&view=<wbr>diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/X86/X86I<wbr>SelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86I<wbr>SelLowering.cpp Wed Jul 6 04:01:20 2016<br>
@@ -15551,8 +15551,11 @@ SDValue X86TargetLowering::LowerSETCC(<wbr>SD<br>
isNullConstant(Op1) &&<br>
(CC == ISD::SETEQ || CC == ISD::SETNE)) {<br>
if (SDValue NewSetCC = LowerToBT(Op0, CC, dl, DAG)) {<br>
- if (VT == MVT::i1)<br>
+ if (VT == MVT::i1) {<br>
+ NewSetCC = DAG.getNode(ISD::AssertZext, dl, MVT::i8, NewSetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
return DAG.getNode(ISD::TRUNCATE, dl, MVT::i1, NewSetCC);<br>
+ }<br>
return NewSetCC;<br>
}<br>
}<br>
@@ -15574,8 +15577,11 @@ SDValue X86TargetLowering::LowerSETCC(<wbr>SD<br>
SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i8,<br>
DAG.getConstant(CCode, dl, MVT::i8),<br>
Op0.getOperand(1));<br>
- if (VT == MVT::i1)<br>
+ if (VT == MVT::i1) {<br>
+ SetCC = DAG.getNode(ISD::AssertZext, dl, MVT::i8, SetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
return DAG.getNode(ISD::TRUNCATE, dl, MVT::i1, SetCC);<br>
+ }<br>
return SetCC;<br>
}<br>
}<br>
@@ -15599,8 +15605,11 @@ SDValue X86TargetLowering::LowerSETCC(<wbr>SD<br>
EFLAGS = ConvertCmpIfNecessary(EFLAGS, DAG);<br>
SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i8,<br>
DAG.getConstant(X86CC, dl, MVT::i8), EFLAGS);<br>
- if (VT == MVT::i1)<br>
+ if (VT == MVT::i1) {<br>
+ SetCC = DAG.getNode(ISD::AssertZext, dl, MVT::i8, SetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
return DAG.getNode(ISD::TRUNCATE, dl, MVT::i1, SetCC);<br>
+ }<br>
return SetCC;<br>
}<br>
<br>
@@ -15619,8 +15628,11 @@ SDValue X86TargetLowering::LowerSETCCE<wbr>(S<br>
SDValue Cmp = DAG.getNode(X86ISD::SBB, DL, VTs, LHS, RHS, Carry);<br>
SDValue SetCC = DAG.getNode(X86ISD::SETCC, DL, MVT::i8,<br>
DAG.getConstant(CC, DL, MVT::i8), Cmp.getValue(1));<br>
- if (Op.getSimpleValueType() == MVT::i1)<br>
- return DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, SetCC);<br>
+ if (Op.getSimpleValueType() == MVT::i1) {<br>
+ SetCC = DAG.getNode(ISD::AssertZext, DL, MVT::i8, SetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
+ return DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, SetCC);<br>
+ }<br>
return SetCC;<br>
}<br>
<br>
@@ -15650,14 +15662,23 @@ static bool isX86LogicalCmp(SDValue Op)<br>
return false;<br>
}<br>
<br>
-static bool isTruncWithZeroHighBitsInput(S<wbr>DValue V, SelectionDAG &DAG) {<br>
+/// Returns the "condition" node, that may be wrapped with "truncate".<br>
+/// Like this: (i1 (trunc (i8 X86ISD::SETCC))).<br>
+static SDValue getCondAfterTruncWithZeroHighB<wbr>itsInput(SDValue V, SelectionDAG &DAG) {<br>
if (V.getOpcode() != ISD::TRUNCATE)<br>
- return false;<br>
+ return V;<br>
<br>
SDValue VOp0 = V.getOperand(0);<br>
+ if (VOp0.getOpcode() == ISD::AssertZext &&<br>
+ V.getValueSizeInBits() ==<br>
+ cast<VTSDNode>(VOp0.getOperand<wbr>(1))->getVT().getSizeInBits())<br>
+ return VOp0.getOperand(0);<br>
+<br>
unsigned InBits = VOp0.getValueSizeInBits();<br>
unsigned Bits = V.getValueSizeInBits();<br>
- return DAG.MaskedValueIsZero(VOp0, APInt::getHighBitsSet(InBits,I<wbr>nBits-Bits));<br>
+ if (DAG.MaskedValueIsZero(VOp0, APInt::getHighBitsSet(InBits,I<wbr>nBits-Bits)))<br>
+ return V.getOperand(0);<br>
+ return V;<br>
}<br>
<br>
SDValue X86TargetLowering::LowerSELECT<wbr>(SDValue Op, SelectionDAG &DAG) const {<br>
@@ -15880,8 +15901,7 @@ SDValue X86TargetLowering::LowerSELECT<wbr>(S<br>
<br>
if (addTest) {<br>
// Look past the truncate if the high bits are known zero.<br>
- if (isTruncWithZeroHighBitsInput(<wbr>Cond, DAG))<br>
- Cond = Cond.getOperand(0);<br>
+ Cond = getCondAfterTruncWithZeroHighB<wbr>itsInput(Cond, DAG);<br>
<br>
// We know the result of AND is compared against zero. Try to match<br>
// it to BT.<br>
@@ -16719,8 +16739,7 @@ SDValue X86TargetLowering::LowerBRCOND<wbr>(S<br>
<br>
if (addTest) {<br>
// Look pass the truncate if the high bits are known zero.<br>
- if (isTruncWithZeroHighBitsInput(<wbr>Cond, DAG))<br>
- Cond = Cond.getOperand(0);<br>
+ Cond = getCondAfterTruncWithZeroHighB<wbr>itsInput(Cond, DAG);<br>
<br>
// We know the result of AND is compared against zero. Try to match<br>
// it to BT.<br>
@@ -17980,7 +17999,7 @@ static SDValue LowerINTRINSIC_WO_CHAIN(S<br>
SDValue RHS = DAG.getBitcast(MVT::v16i1, Op.getOperand(2));<br>
SDValue CC = DAG.getConstant(X86CC, dl, MVT::i8);<br>
SDValue Test = DAG.getNode(X86ISD::KORTEST, dl, MVT::i32, LHS, RHS);<br>
- SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i1, CC, Test);<br>
+ SDValue SetCC = DAG.getNode(X86ISD::SETCC, dl, MVT::i8, CC, Test);<br>
return DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, SetCC);<br>
}<br>
<br>
@@ -20494,10 +20513,15 @@ static SDValue LowerXALUO(SDValue Op, Se<br>
SDValue Sum = DAG.getNode(X86ISD::UMUL, DL, VTs, LHS, RHS);<br>
<br>
SDValue SetCC =<br>
- DAG.getNode(X86ISD::SETCC, DL, N->getValueType(1),<br>
+ DAG.getNode(X86ISD::SETCC, DL, MVT::i8,<br>
DAG.getConstant(X86::COND_O, DL, MVT::i32),<br>
SDValue(Sum.getNode(), 2));<br>
<br>
+ if (N->getValueType(1) == MVT::i1) {<br>
+ SetCC = DAG.getNode(ISD::AssertZext, DL, MVT::i8, SetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
+ SetCC = DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, SetCC);<br>
+ }<br>
return DAG.getNode(ISD::MERGE_VALUES, DL, N->getVTList(), Sum, SetCC);<br>
}<br>
}<br>
@@ -20507,10 +20531,15 @@ static SDValue LowerXALUO(SDValue Op, Se<br>
SDValue Sum = DAG.getNode(BaseOp, DL, VTs, LHS, RHS);<br>
<br>
SDValue SetCC =<br>
- DAG.getNode(X86ISD::SETCC, DL, N->getValueType(1),<br>
+ DAG.getNode(X86ISD::SETCC, DL, MVT::i8,<br>
DAG.getConstant(Cond, DL, MVT::i32),<br>
SDValue(Sum.getNode(), 1));<br>
-<br>
+<br>
+ if (N->getValueType(1) == MVT::i1) {<br>
+ SetCC = DAG.getNode(ISD::AssertZext, DL, MVT::i8, SetCC,<br>
+ DAG.getValueType(MVT::i1));<br>
+ SetCC = DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, SetCC);<br>
+ }<br>
return DAG.getNode(ISD::MERGE_VALUES, DL, N->getVTList(), Sum, SetCC);<br>
}<br>
<br>
@@ -26870,6 +26899,7 @@ static SDValue checkBoolTestSetCCCombine<br>
// Skip (zext $x), (trunc $x), or (and $x, 1) node.<br>
while (SetCC.getOpcode() == ISD::ZERO_EXTEND ||<br>
SetCC.getOpcode() == ISD::TRUNCATE ||<br>
+ SetCC.getOpcode() == ISD::AssertZext ||<br>
SetCC.getOpcode() == ISD::AND) {<br>
if (SetCC.getOpcode() == ISD::AND) {<br>
int OpIdx = -1;<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86I<wbr>nstrAVX512.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Target/X8<wbr>6/X86InstrAVX512.td?rev=274613<wbr>&r1=274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/X86/X86I<wbr>nstrAVX512.td (original)<br>
+++ llvm/trunk/lib/Target/X86/X86I<wbr>nstrAVX512.td Wed Jul 6 04:01:20 2016<br>
@@ -2083,51 +2083,65 @@ let Predicates = [HasBWI] in {<br>
(KMOVQkm addr:$src)>;<br>
}<br>
<br>
+def assertzext_i1 : PatFrag<(ops node:$src), (assertzext node:$src), [{<br>
+ return cast<VTSDNode>(N->getOperand(1<wbr>))->getVT() == MVT::i1;<br>
+}]>;<br>
+<br>
let Predicates = [HasAVX512] in {<br>
def : Pat<(i1 (trunc (i64 GR64:$src))),<br>
- (COPY_TO_REGCLASS (KMOVWkr (AND32ri8 (EXTRACT_SUBREG $src, sub_32bit),<br>
- (i32 1))), VK1)>;<br>
+ (COPY_TO_REGCLASS (i16 (EXTRACT_SUBREG (AND64ri8 $src, (i64 1)),<br>
+ sub_16bit)), VK1)>;<br>
+<br>
+ def : Pat<(i1 (trunc (i64 (assertzext_i1 GR64:$src)))),<br>
+ (COPY_TO_REGCLASS (i16 (EXTRACT_SUBREG $src, sub_16bit)), VK1)>;<br>
<br>
def : Pat<(i1 (trunc (i32 GR32:$src))),<br>
- (COPY_TO_REGCLASS (KMOVWkr (AND32ri8 $src, (i32 1))), VK1)>;<br>
+ (COPY_TO_REGCLASS (i16 (EXTRACT_SUBREG (AND32ri8 $src, (i32 1)),<br>
+ sub_16bit)), VK1)>;<br>
+<br>
+ def : Pat<(i1 (trunc (i32 (assertzext_i1 GR32:$src)))),<br>
+ (COPY_TO_REGCLASS (i16 (EXTRACT_SUBREG $src, sub_16bit)), VK1)>;<br>
<br>
def : Pat<(i1 (trunc (i8 GR8:$src))),<br>
- (COPY_TO_REGCLASS<br>
- (KMOVWkr (AND32ri8 (SUBREG_TO_REG (i32 0), GR8:$src, sub_8bit), (i32 1))),<br>
- VK1)>;<br>
+ (COPY_TO_REGCLASS (i16 (SUBREG_TO_REG (i64 0), (AND8ri8 $src, (i8 1)),<br>
+ sub_8bit)), VK1)>;<br>
+<br>
+ def : Pat<(i1 (trunc (i8 (assertzext_i1 GR8:$src)))),<br>
+ (COPY_TO_REGCLASS (i16 (SUBREG_TO_REG (i64 0), $src, sub_8bit)), VK1)>;<br>
+<br>
def : Pat<(i1 (trunc (i16 GR16:$src))),<br>
- (COPY_TO_REGCLASS<br>
- (KMOVWkr (AND32ri8 (SUBREG_TO_REG (i32 0), $src, sub_16bit), (i32 1))),<br>
- VK1)>;<br>
+ (COPY_TO_REGCLASS (i16 (AND16ri8 $src, (i16 1))), VK1)>;<br>
+<br>
+ def : Pat<(i1 (trunc (i16 (assertzext_i1 GR16:$src)))),<br>
+ (COPY_TO_REGCLASS $src, VK1)>;<br>
<br>
def : Pat<(i32 (zext VK1:$src)),<br>
- (AND32ri8 (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), (i32 1))>;<br>
+ (i32 (SUBREG_TO_REG (i64 0), (i16 (COPY_TO_REGCLASS $src, GR16)),<br>
+ sub_16bit))>;<br>
+<br>
def : Pat<(i32 (anyext VK1:$src)),<br>
- (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16))>;<br>
+ (i32 (SUBREG_TO_REG (i64 0), (i16 (COPY_TO_REGCLASS $src, GR16)),<br>
+ sub_16bit))>;<br>
<br>
def : Pat<(i8 (zext VK1:$src)),<br>
- (EXTRACT_SUBREG<br>
- (AND32ri8 (KMOVWrk<br>
- (COPY_TO_REGCLASS VK1:$src, VK16)), (i32 1)), sub_8bit)>;<br>
+ (i8 (EXTRACT_SUBREG (i16 (COPY_TO_REGCLASS VK1:$src, GR16)), sub_8bit))>;<br>
+<br>
def : Pat<(i8 (anyext VK1:$src)),<br>
- (EXTRACT_SUBREG<br>
- (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), sub_8bit)>;<br>
+ (i8 (EXTRACT_SUBREG (i16 (COPY_TO_REGCLASS $src, GR16)), sub_8bit))>;<br>
<br>
def : Pat<(i64 (zext VK1:$src)),<br>
- (AND64ri8 (SUBREG_TO_REG (i64 0),<br>
- (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), sub_32bit), (i64 1))>;<br>
+ (i64 (SUBREG_TO_REG (i64 0), (i16 (COPY_TO_REGCLASS $src, GR16)),<br>
+ sub_16bit))>;<br>
+<br>
def : Pat<(i64 (anyext VK1:$src)),<br>
- (SUBREG_TO_REG (i64 0),<br>
- (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), sub_32bit)>;<br>
+ (i64 (SUBREG_TO_REG (i64 0), (i16 (COPY_TO_REGCLASS $src, GR16)),<br>
+ sub_16bit))>;<br>
<br>
def : Pat<(i16 (zext VK1:$src)),<br>
- (EXTRACT_SUBREG<br>
- (AND32ri8 (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), (i32 1)),<br>
- sub_16bit)>;<br>
+ (COPY_TO_REGCLASS $src, GR16)>;<br>
+<br>
def : Pat<(i16 (anyext VK1:$src)),<br>
- (EXTRACT_SUBREG<br>
- (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)),<br>
- sub_16bit)>;<br>
+ (i16 (COPY_TO_REGCLASS $src, GR16))>;<br>
}<br>
def : Pat<(v16i1 (scalar_to_vector VK1:$src)),<br>
(COPY_TO_REGCLASS VK1:$src, VK16)>;<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512-cmp.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-cmp.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512-cmp.ll?rev=274613&<wbr>r1=274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512-cmp.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512-cmp.ll Wed Jul 6 04:01:20 2016<br>
@@ -163,12 +163,10 @@ define i32 @test10(i64 %b, i64 %c, i1 %d<br>
; ALL-NEXT: kmovw %edx, %k0<br>
; ALL-NEXT: cmpq %rsi, %rdi<br>
; ALL-NEXT: sete %al<br>
-; ALL-NEXT: andl $1, %eax<br>
; ALL-NEXT: kmovw %eax, %k1<br>
; ALL-NEXT: korw %k1, %k0, %k1<br>
; ALL-NEXT: kxorw %k1, %k0, %k0<br>
; ALL-NEXT: kmovw %k0, %eax<br>
-; ALL-NEXT: andl $1, %eax<br>
; ALL-NEXT: testb %al, %al<br>
; ALL-NEXT: je LBB8_1<br>
; ALL-NEXT: ## BB#2: ## %if.end.i<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512-ext.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-ext.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512-ext.ll?rev=274613&<wbr>r1=274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512-ext.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512-ext.ll Wed Jul 6 04:01:20 2016<br>
@@ -1513,265 +1513,264 @@ define <64 x i16> @test21(<64 x i16> %x<br>
; KNL-NEXT: vptestmd %zmm4, %zmm4, %k0<br>
; KNL-NEXT: kshiftlw $14, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %edx<br>
+; KNL-NEXT: kmovw %k1, %ecx<br>
; KNL-NEXT: kshiftlw $15, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %eax<br>
+; KNL-NEXT: kmovw %k1, %r15d<br>
; KNL-NEXT: kshiftlw $13, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %ecx<br>
+; KNL-NEXT: kmovw %k1, %r12d<br>
; KNL-NEXT: kshiftlw $12, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %edi<br>
+; KNL-NEXT: kmovw %k1, %edx<br>
; KNL-NEXT: kshiftlw $11, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %esi<br>
+; KNL-NEXT: kmovw %k1, %r13d<br>
; KNL-NEXT: kshiftlw $10, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r13d<br>
+; KNL-NEXT: kmovw %k1, %eax<br>
+; KNL-NEXT: movl %eax, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
; KNL-NEXT: kshiftlw $9, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r8d<br>
+; KNL-NEXT: kmovw %k1, %esi<br>
; KNL-NEXT: kshiftlw $8, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r10d<br>
+; KNL-NEXT: kmovw %k1, %edi<br>
; KNL-NEXT: kshiftlw $7, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r11d<br>
+; KNL-NEXT: kmovw %k1, %r8d<br>
; KNL-NEXT: kshiftlw $6, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %ebx<br>
+; KNL-NEXT: kmovw %k1, %r9d<br>
; KNL-NEXT: kshiftlw $5, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %ebp<br>
+; KNL-NEXT: kmovw %k1, %r10d<br>
; KNL-NEXT: kshiftlw $4, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r14d<br>
+; KNL-NEXT: kmovw %k1, %r11d<br>
; KNL-NEXT: kshiftlw $3, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r15d<br>
+; KNL-NEXT: kmovw %k1, %ebx<br>
; KNL-NEXT: kshiftlw $2, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r9d<br>
+; KNL-NEXT: kmovw %k1, %ebp<br>
; KNL-NEXT: kshiftlw $1, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r12d<br>
-; KNL-NEXT: vptestmd %zmm5, %zmm5, %k1<br>
+; KNL-NEXT: kmovw %k1, %r14d<br>
+; KNL-NEXT: vptestmd %zmm5, %zmm5, %k2<br>
; KNL-NEXT: kshiftlw $0, %k0, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vmovd %eax, %xmm4<br>
+; KNL-NEXT: vmovd %r15d, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r15d<br>
+; KNL-NEXT: kshiftlw $14, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $1, %ecx, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %ecx<br>
+; KNL-NEXT: kshiftlw $15, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $2, %r12d, %xmm4, %xmm4<br>
; KNL-NEXT: kmovw %k0, %eax<br>
-; KNL-NEXT: kshiftlw $14, %k1, %k0<br>
+; KNL-NEXT: kshiftlw $13, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $1, %edx, %xmm4, %xmm4<br>
+; KNL-NEXT: vpinsrb $3, %edx, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r12d<br>
+; KNL-NEXT: kshiftlw $12, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $4, %r13d, %xmm4, %xmm4<br>
; KNL-NEXT: kmovw %k0, %edx<br>
-; KNL-NEXT: movl %edx, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
-; KNL-NEXT: kshiftlw $15, %k1, %k0<br>
+; KNL-NEXT: kshiftlw $11, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $5, -{{[0-9]+}}(%rsp), %xmm4, %xmm4 ## 4-byte Folded Reload<br>
+; KNL-NEXT: kmovw %k0, %r13d<br>
+; KNL-NEXT: kshiftlw $10, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $6, %esi, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %esi<br>
+; KNL-NEXT: movl %esi, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
+; KNL-NEXT: kshiftlw $9, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $2, %ecx, %xmm4, %xmm4<br>
+; KNL-NEXT: vpinsrb $7, %edi, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %esi<br>
+; KNL-NEXT: kshiftlw $8, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $8, %r8d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %edi<br>
+; KNL-NEXT: kshiftlw $7, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $9, %r9d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r8d<br>
+; KNL-NEXT: kshiftlw $6, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $10, %r10d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r9d<br>
+; KNL-NEXT: kshiftlw $5, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $11, %r11d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r10d<br>
+; KNL-NEXT: kshiftlw $4, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $12, %ebx, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %ebx<br>
+; KNL-NEXT: kshiftlw $3, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $13, %ebp, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %ebp<br>
+; KNL-NEXT: kshiftlw $2, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $14, %r14d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r11d<br>
+; KNL-NEXT: kshiftlw $1, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $15, %r15d, %xmm4, %xmm4<br>
+; KNL-NEXT: kmovw %k0, %r14d<br>
+; KNL-NEXT: vptestmd %zmm6, %zmm6, %k1<br>
+; KNL-NEXT: kshiftlw $0, %k2, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vmovd %eax, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r15d<br>
+; KNL-NEXT: kshiftlw $14, %k1, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $1, %ecx, %xmm5, %xmm5<br>
; KNL-NEXT: kmovw %k0, %ecx<br>
+; KNL-NEXT: kshiftlw $15, %k1, %k0<br>
+; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
+; KNL-NEXT: vpinsrb $2, %r12d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %eax<br>
; KNL-NEXT: kshiftlw $13, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $3, %edi, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %edi<br>
+; KNL-NEXT: vpinsrb $3, %edx, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r12d<br>
; KNL-NEXT: kshiftlw $12, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $4, %esi, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %esi<br>
+; KNL-NEXT: vpinsrb $4, %r13d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %edx<br>
; KNL-NEXT: kshiftlw $11, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $5, %r13d, %xmm4, %xmm4<br>
+; KNL-NEXT: vpinsrb $5, -{{[0-9]+}}(%rsp), %xmm5, %xmm5 ## 4-byte Folded Reload<br>
; KNL-NEXT: kmovw %k0, %r13d<br>
; KNL-NEXT: kshiftlw $10, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $6, %r8d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r8d<br>
+; KNL-NEXT: vpinsrb $6, %esi, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %esi<br>
+; KNL-NEXT: movl %esi, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
; KNL-NEXT: kshiftlw $9, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $7, %r10d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r10d<br>
+; KNL-NEXT: vpinsrb $7, %edi, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %esi<br>
; KNL-NEXT: kshiftlw $8, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $8, %r11d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r11d<br>
+; KNL-NEXT: vpinsrb $8, %r8d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %edi<br>
; KNL-NEXT: kshiftlw $7, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $9, %ebx, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %ebx<br>
+; KNL-NEXT: vpinsrb $9, %r9d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r8d<br>
; KNL-NEXT: kshiftlw $6, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $10, %ebp, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %ebp<br>
+; KNL-NEXT: vpinsrb $10, %r10d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r9d<br>
; KNL-NEXT: kshiftlw $5, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $11, %r14d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r14d<br>
+; KNL-NEXT: vpinsrb $11, %ebx, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %ebx<br>
; KNL-NEXT: kshiftlw $4, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $12, %r15d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r15d<br>
+; KNL-NEXT: vpinsrb $12, %ebp, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %ebp<br>
; KNL-NEXT: kshiftlw $3, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $13, %r9d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %edx<br>
-; KNL-NEXT: movl %edx, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
+; KNL-NEXT: vpinsrb $13, %r11d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r10d<br>
; KNL-NEXT: kshiftlw $2, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $14, %r12d, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r12d<br>
+; KNL-NEXT: vpinsrb $14, %r14d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r11d<br>
; KNL-NEXT: kshiftlw $1, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $15, %eax, %xmm4, %xmm4<br>
-; KNL-NEXT: kmovw %k0, %r9d<br>
-; KNL-NEXT: vptestmd %zmm6, %zmm6, %k0<br>
+; KNL-NEXT: vpinsrb $15, %r15d, %xmm5, %xmm5<br>
+; KNL-NEXT: kmovw %k0, %r14d<br>
+; KNL-NEXT: vptestmd %zmm7, %zmm7, %k0<br>
; KNL-NEXT: kshiftlw $0, %k1, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vmovd %ecx, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %edx<br>
+; KNL-NEXT: vmovd %eax, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r15d<br>
; KNL-NEXT: kshiftlw $14, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $1, -{{[0-9]+}}(%rsp), %xmm5, %xmm5 ## 4-byte Folded Reload<br>
-; KNL-NEXT: kmovw %k1, %eax<br>
-; KNL-NEXT: movl %eax, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
+; KNL-NEXT: vpinsrb $1, %ecx, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %ecx<br>
; KNL-NEXT: kshiftlw $15, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $2, %edi, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %eax<br>
+; KNL-NEXT: vpinsrb $2, %r12d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r12d<br>
; KNL-NEXT: kshiftlw $13, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $3, %esi, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %edi<br>
+; KNL-NEXT: vpinsrb $3, %edx, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %edx<br>
; KNL-NEXT: kshiftlw $12, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $4, %r13d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %ecx<br>
+; KNL-NEXT: vpinsrb $4, %r13d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r13d<br>
; KNL-NEXT: kshiftlw $11, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $5, %r8d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r8d<br>
+; KNL-NEXT: vpinsrb $5, -{{[0-9]+}}(%rsp), %xmm6, %xmm6 ## 4-byte Folded Reload<br>
+; KNL-NEXT: kmovw %k1, %eax<br>
; KNL-NEXT: kshiftlw $10, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $6, %r10d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r13d<br>
+; KNL-NEXT: vpinsrb $6, %esi, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %esi<br>
; KNL-NEXT: kshiftlw $9, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $7, %r11d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %esi<br>
-; KNL-NEXT: movl %esi, -{{[0-9]+}}(%rsp) ## 4-byte Spill<br>
+; KNL-NEXT: vpinsrb $7, %edi, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %edi<br>
; KNL-NEXT: kshiftlw $8, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $8, %ebx, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %ebx<br>
+; KNL-NEXT: vpinsrb $8, %r8d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r8d<br>
; KNL-NEXT: kshiftlw $7, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $9, %ebp, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %ebp<br>
+; KNL-NEXT: vpinsrb $9, %r9d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r9d<br>
; KNL-NEXT: kshiftlw $6, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $10, %r14d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r10d<br>
+; KNL-NEXT: vpinsrb $10, %ebx, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %ebx<br>
; KNL-NEXT: kshiftlw $5, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $11, %r15d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r11d<br>
+; KNL-NEXT: vpinsrb $11, %ebp, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %ebp<br>
; KNL-NEXT: kshiftlw $4, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $12, -{{[0-9]+}}(%rsp), %xmm5, %xmm5 ## 4-byte Folded Reload<br>
-; KNL-NEXT: kmovw %k1, %esi<br>
+; KNL-NEXT: vpinsrb $12, %r10d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r10d<br>
; KNL-NEXT: kshiftlw $3, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $13, %r12d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r14d<br>
+; KNL-NEXT: vpinsrb $13, %r11d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r11d<br>
; KNL-NEXT: kshiftlw $2, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $14, %r9d, %xmm5, %xmm5<br>
-; KNL-NEXT: kmovw %k1, %r9d<br>
+; KNL-NEXT: vpinsrb $14, %r14d, %xmm6, %xmm6<br>
+; KNL-NEXT: kmovw %k1, %r14d<br>
; KNL-NEXT: kshiftlw $1, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vpinsrb $15, %edx, %xmm5, %xmm5<br>
+; KNL-NEXT: vpinsrb $15, %r15d, %xmm6, %xmm6<br>
; KNL-NEXT: kmovw %k1, %r15d<br>
-; KNL-NEXT: vptestmd %zmm7, %zmm7, %k1<br>
; KNL-NEXT: kshiftlw $0, %k0, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vmovd %eax, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r12d<br>
-; KNL-NEXT: kshiftlw $14, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $1, -{{[0-9]+}}(%rsp), %xmm6, %xmm6 ## 4-byte Folded Reload<br>
-; KNL-NEXT: kmovw %k0, %eax<br>
-; KNL-NEXT: kshiftlw $15, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $2, %edi, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %edx<br>
-; KNL-NEXT: kshiftlw $13, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $3, %ecx, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %ecx<br>
-; KNL-NEXT: kshiftlw $12, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $4, %r8d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r8d<br>
-; KNL-NEXT: kshiftlw $11, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $5, %r13d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r13d<br>
-; KNL-NEXT: kshiftlw $10, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $6, -{{[0-9]+}}(%rsp), %xmm6, %xmm6 ## 4-byte Folded Reload<br>
-; KNL-NEXT: kmovw %k0, %edi<br>
-; KNL-NEXT: kshiftlw $9, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $7, %ebx, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %ebx<br>
-; KNL-NEXT: kshiftlw $8, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $8, %ebp, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %ebp<br>
-; KNL-NEXT: kshiftlw $7, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $9, %r10d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r10d<br>
-; KNL-NEXT: kshiftlw $6, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $10, %r11d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r11d<br>
-; KNL-NEXT: kshiftlw $5, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $11, %esi, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %esi<br>
-; KNL-NEXT: kshiftlw $4, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $12, %r14d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r14d<br>
-; KNL-NEXT: kshiftlw $3, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $13, %r9d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r9d<br>
-; KNL-NEXT: kshiftlw $2, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $14, %r15d, %xmm6, %xmm6<br>
-; KNL-NEXT: kmovw %k0, %r15d<br>
-; KNL-NEXT: kshiftlw $1, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vpinsrb $15, %r12d, %xmm6, %xmm6<br>
+; KNL-NEXT: vmovd %r12d, %xmm7<br>
; KNL-NEXT: kmovw %k0, %r12d<br>
-; KNL-NEXT: kshiftlw $0, %k1, %k0<br>
-; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: vmovd %edx, %xmm7<br>
-; KNL-NEXT: kmovw %k0, %edx<br>
-; KNL-NEXT: vpinsrb $1, %eax, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $2, %ecx, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $3, %r8d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $4, %r13d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $5, %edi, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $6, %ebx, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $7, %ebp, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $8, %r10d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $9, %r11d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $10, %esi, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $11, %r14d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $12, %r9d, %xmm7, %xmm7<br>
-; KNL-NEXT: vpinsrb $13, %r15d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $1, %ecx, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $2, %edx, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $3, %r13d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $4, %eax, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $5, %esi, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $6, %edi, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $7, %r8d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $8, %r9d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $9, %ebx, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $10, %ebp, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $11, %r10d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $12, %r11d, %xmm7, %xmm7<br>
+; KNL-NEXT: vpinsrb $13, %r14d, %xmm7, %xmm7<br>
; KNL-NEXT: vpmovzxbw {{.*#+}} ymm4 = xmm4[0],zero,xmm4[1],zero,xmm4<wbr>[2],zero,xmm4[3],zero,xmm4[4],<wbr>zero,xmm4[5],zero,xmm4[6],<wbr>zero,xmm4[7],zero,xmm4[8],<wbr>zero,xmm4[9],zero,xmm4[10],<wbr>zero,xmm4[11],zero,xmm4[12],<wbr>zero,xmm4[13],zero,xmm4[14],<wbr>zero,xmm4[15],zero<br>
; KNL-NEXT: vpsllw $15, %ymm4, %ymm4<br>
; KNL-NEXT: vpsraw $15, %ymm4, %ymm4<br>
@@ -1784,8 +1783,8 @@ define <64 x i16> @test21(<64 x i16> %x<br>
; KNL-NEXT: vpsllw $15, %ymm4, %ymm4<br>
; KNL-NEXT: vpsraw $15, %ymm4, %ymm4<br>
; KNL-NEXT: vpand %ymm2, %ymm4, %ymm2<br>
-; KNL-NEXT: vpinsrb $14, %r12d, %xmm7, %xmm4<br>
-; KNL-NEXT: vpinsrb $15, %edx, %xmm4, %xmm4<br>
+; KNL-NEXT: vpinsrb $14, %r15d, %xmm7, %xmm4<br>
+; KNL-NEXT: vpinsrb $15, %r12d, %xmm4, %xmm4<br>
; KNL-NEXT: vpmovzxbw {{.*#+}} ymm4 = xmm4[0],zero,xmm4[1],zero,xmm4<wbr>[2],zero,xmm4[3],zero,xmm4[4],<wbr>zero,xmm4[5],zero,xmm4[6],<wbr>zero,xmm4[7],zero,xmm4[8],<wbr>zero,xmm4[9],zero,xmm4[10],<wbr>zero,xmm4[11],zero,xmm4[12],<wbr>zero,xmm4[13],zero,xmm4[14],<wbr>zero,xmm4[15],zero<br>
; KNL-NEXT: vpsllw $15, %ymm4, %ymm4<br>
; KNL-NEXT: vpsraw $15, %ymm4, %ymm4<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512-insert-extract.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-insert-extract.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512-insert-extract.ll?<wbr>rev=274613&r1=274612&r2=<wbr>274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512-insert-extract.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512-insert-extract.ll Wed Jul 6 04:01:20 2016<br>
@@ -159,7 +159,6 @@ define i64 @test12(<16 x i64>%a, <16 x i<br>
;CHECK-LABEL: test13<br>
;CHECK: cmpl %esi, %edi<br>
;CHECK: setb %al<br>
-;CHECK: andl $1, %eax<br>
;CHECK: kmovw %eax, %k0<br>
;CHECK: movw $-4<br>
;CHECK: korw<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512-intrinsics.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512-intrinsics.ll?rev=<wbr>274613&r1=274612&r2=274613&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512-intrinsics.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512-intrinsics.ll Wed Jul 6 04:01:20 2016<br>
@@ -9,9 +9,7 @@ define i32 @test_kortestz(i16 %a0, i16 %<br>
; CHECK-NEXT: kmovw %edi, %k1<br>
; CHECK-NEXT: kortestw %k0, %k1<br>
; CHECK-NEXT: sete %al<br>
-; CHECK-NEXT: kmovw %eax, %k0<br>
-; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
+; CHECK-NEXT: movzbl %al, %eax<br>
; CHECK-NEXT: retq<br>
%res = call i32 @llvm.x86.avx512.kortestz.w(i1<wbr>6 %a0, i16 %a1)<br>
ret i32 %res<br>
@@ -5091,7 +5089,6 @@ define i8@test_int_x86_avx512_mask_cm<wbr>p_s<br>
; CHECK-NEXT: kmovw %edi, %k1<br>
; CHECK-NEXT: vcmpnltsd {sae}, %xmm1, %xmm0, %k0 {%k1}<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: retq<br>
<br>
%res4 = call i8 @<a href="http://llvm.x86.avx512.mask.cmp.sd" rel="noreferrer" target="_blank">llvm.x86.avx512.mask.cmp.sd</a>(<<wbr>2 x double> %x0, <2 x double> %x1, i32 5, i8 %x3, i32 8)<br>
@@ -5112,7 +5109,6 @@ define i8@test_int_x86_avx512_mask_cm<wbr>p_s<br>
; CHECK-NEXT: kandw %k2, %k1, %k1<br>
; CHECK-NEXT: korw %k1, %k0, %k0<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: retq<br>
<br>
%res1 = call i8 @<a href="http://llvm.x86.avx512.mask.cmp.sd" rel="noreferrer" target="_blank">llvm.x86.avx512.mask.cmp.sd</a>(<<wbr>2 x double> %x0, <2 x double> %x1, i32 2, i8 -1, i32 4)<br>
@@ -5135,7 +5131,6 @@ define i8@test_int_x86_avx512_mask_cm<wbr>p_s<br>
; CHECK-NEXT: kmovw %edi, %k1<br>
; CHECK-NEXT: vcmpunordss %xmm1, %xmm0, %k0 {%k1}<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: retq<br>
<br>
%res2 = call i8 @llvm.x86.avx512.mask.cmp.ss(<<wbr>4 x float> %x0, <4 x float> %x1, i32 3, i8 %x3, i32 4)<br>
@@ -5153,9 +5148,8 @@ define i8@test_int_x86_avx512_mask_cm<wbr>p_s<br>
; CHECK-NEXT: vcmpneqss %xmm1, %xmm0, %k2 {%k1}<br>
; CHECK-NEXT: kmovw %k2, %ecx<br>
; CHECK-NEXT: vcmpnltss {sae}, %xmm1, %xmm0, %k1 {%k1}<br>
-; CHECK-NEXT: kmovw %k1, %edx<br>
-; CHECK-NEXT: andl $1, %edx<br>
-; CHECK-NEXT: kmovw %k0, %eax<br>
+; CHECK-NEXT: kmovw %k1, %eax<br>
+; CHECK-NEXT: kmovw %k0, %edx<br>
; CHECK-NEXT: andb %cl, %al<br>
; CHECK-NEXT: andb %dl, %al<br>
; CHECK-NEXT: retq<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512-mask-op.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-mask-op.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512-mask-op.ll?rev=<wbr>274613&r1=274612&r2=274613&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512-mask-op.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512-mask-op.ll Wed Jul 6 04:01:20 2016<br>
@@ -173,18 +173,35 @@ define i32 @zext_test1(<16 x i32> %a, <1<br>
; CHECK-NEXT: kshiftlw $10, %k0, %k0<br>
; CHECK-NEXT: kshiftrw $15, %k0, %k0<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: retq<br>
%cmp_res = icmp ugt <16 x i32> %a, %b<br>
%cmp_res.i1 = extractelement <16 x i1> %cmp_res, i32 5<br>
%res = zext i1 %cmp_res.i1 to i32<br>
ret i32 %res<br>
-}define i16 @zext_test2(<16 x i32> %a, <16 x i32> %b) {<br>
+}<br>
+<br>
+define i16 @zext_test2(<16 x i32> %a, <16 x i32> %b) {<br>
+; CHECK-LABEL: zext_test2:<br>
+; CHECK: ## BB#0:<br>
+; CHECK-NEXT: vpcmpnleud %zmm1, %zmm0, %k0<br>
+; CHECK-NEXT: kshiftlw $10, %k0, %k0<br>
+; CHECK-NEXT: kshiftrw $15, %k0, %k0<br>
+; CHECK-NEXT: kmovw %k0, %eax<br>
+; CHECK-NEXT: retq<br>
%cmp_res = icmp ugt <16 x i32> %a, %b<br>
%cmp_res.i1 = extractelement <16 x i1> %cmp_res, i32 5<br>
%res = zext i1 %cmp_res.i1 to i16<br>
ret i16 %res<br>
-}define i8 @zext_test3(<16 x i32> %a, <16 x i32> %b) {<br>
+}<br>
+<br>
+define i8 @zext_test3(<16 x i32> %a, <16 x i32> %b) {<br>
+; CHECK-LABEL: zext_test3:<br>
+; CHECK: ## BB#0:<br>
+; CHECK-NEXT: vpcmpnleud %zmm1, %zmm0, %k0<br>
+; CHECK-NEXT: kshiftlw $10, %k0, %k0<br>
+; CHECK-NEXT: kshiftrw $15, %k0, %k0<br>
+; CHECK-NEXT: kmovw %k0, %eax<br>
+; CHECK-NEXT: retq<br>
%cmp_res = icmp ugt <16 x i32> %a, %b<br>
%cmp_res.i1 = extractelement <16 x i1> %cmp_res, i32 5<br>
%res = zext i1 %cmp_res.i1 to i8<br>
@@ -579,7 +596,6 @@ define <64 x i8> @test17(i64 %x, i32 %y,<br>
; SKX-NEXT: kmovq %rdi, %k0<br>
; SKX-NEXT: cmpl %edx, %esi<br>
; SKX-NEXT: setg %al<br>
-; SKX-NEXT: andl $1, %eax<br>
; SKX-NEXT: kmovw %eax, %k1<br>
; SKX-NEXT: kshiftlq $5, %k1, %k1<br>
; SKX-NEXT: korq %k1, %k0, %k0<br>
@@ -1623,10 +1639,10 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k1, %r8d<br>
; KNL-NEXT: kshiftlw $15, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r10d<br>
+; KNL-NEXT: kmovw %k1, %r9d<br>
; KNL-NEXT: kshiftlw $13, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %r9d<br>
+; KNL-NEXT: kmovw %k1, %r10d<br>
; KNL-NEXT: kshiftlw $12, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
; KNL-NEXT: kmovw %k1, %r11d<br>
@@ -1653,22 +1669,22 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k1, %eax<br>
; KNL-NEXT: kshiftlw $4, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %edx<br>
+; KNL-NEXT: kmovw %k1, %ecx<br>
; KNL-NEXT: kshiftlw $3, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: kmovw %k1, %ecx<br>
+; KNL-NEXT: kmovw %k1, %edx<br>
; KNL-NEXT: kshiftlw $2, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
; KNL-NEXT: kmovw %k1, %esi<br>
; KNL-NEXT: kshiftlw $1, %k0, %k1<br>
; KNL-NEXT: kshiftrw $15, %k1, %k1<br>
-; KNL-NEXT: vmovd %r10d, %xmm3<br>
-; KNL-NEXT: kmovw %k1, %r10d<br>
+; KNL-NEXT: vmovd %r9d, %xmm3<br>
+; KNL-NEXT: kmovw %k1, %r9d<br>
; KNL-NEXT: vptestmd %zmm2, %zmm2, %k2<br>
; KNL-NEXT: kshiftlw $0, %k0, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
; KNL-NEXT: vpinsrb $1, %r8d, %xmm3, %xmm2<br>
-; KNL-NEXT: vpinsrb $2, %r9d, %xmm2, %xmm2<br>
+; KNL-NEXT: vpinsrb $2, %r10d, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $3, %r11d, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $4, %r14d, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $5, %r15d, %xmm2, %xmm2<br>
@@ -1677,10 +1693,10 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: vpinsrb $8, %ebx, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $9, %ebp, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $10, %eax, %xmm2, %xmm2<br>
-; KNL-NEXT: vpinsrb $11, %edx, %xmm2, %xmm2<br>
-; KNL-NEXT: vpinsrb $12, %ecx, %xmm2, %xmm2<br>
+; KNL-NEXT: vpinsrb $11, %ecx, %xmm2, %xmm2<br>
+; KNL-NEXT: vpinsrb $12, %edx, %xmm2, %xmm2<br>
; KNL-NEXT: vpinsrb $13, %esi, %xmm2, %xmm2<br>
-; KNL-NEXT: vpinsrb $14, %r10d, %xmm2, %xmm2<br>
+; KNL-NEXT: vpinsrb $14, %r9d, %xmm2, %xmm2<br>
; KNL-NEXT: kmovw %k0, %eax<br>
; KNL-NEXT: vpinsrb $15, %eax, %xmm2, %xmm2<br>
; KNL-NEXT: vpmovsxbd %xmm2, %zmm2<br>
@@ -1713,7 +1729,7 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k0, %r13d<br>
; KNL-NEXT: kshiftlw $7, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: kmovw %k0, %ecx<br>
+; KNL-NEXT: kmovw %k0, %edx<br>
; KNL-NEXT: kshiftlw $6, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
; KNL-NEXT: kmovw %k0, %esi<br>
@@ -1728,7 +1744,7 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k0, %eax<br>
; KNL-NEXT: kshiftlw $2, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: kmovw %k0, %edx<br>
+; KNL-NEXT: kmovw %k0, %ecx<br>
; KNL-NEXT: kshiftlw $1, %k2, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
; KNL-NEXT: vmovd %r10d, %xmm2<br>
@@ -1743,12 +1759,12 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: vpinsrb $5, %r15d, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $6, %r12d, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $7, %r13d, %xmm1, %xmm1<br>
-; KNL-NEXT: vpinsrb $8, %ecx, %xmm1, %xmm1<br>
+; KNL-NEXT: vpinsrb $8, %edx, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $9, %esi, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $10, %ebp, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $11, %ebx, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1<br>
-; KNL-NEXT: vpinsrb $13, %edx, %xmm1, %xmm1<br>
+; KNL-NEXT: vpinsrb $13, %ecx, %xmm1, %xmm1<br>
; KNL-NEXT: vpinsrb $14, %r10d, %xmm1, %xmm1<br>
; KNL-NEXT: kmovw %k0, %eax<br>
; KNL-NEXT: vpinsrb $15, %eax, %xmm1, %xmm1<br>
@@ -1782,7 +1798,7 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k0, %r13d<br>
; KNL-NEXT: kshiftlw $7, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: kmovw %k0, %ecx<br>
+; KNL-NEXT: kmovw %k0, %edx<br>
; KNL-NEXT: kshiftlw $6, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
; KNL-NEXT: kmovw %k0, %esi<br>
@@ -1797,7 +1813,7 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: kmovw %k0, %eax<br>
; KNL-NEXT: kshiftlw $2, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
-; KNL-NEXT: kmovw %k0, %edx<br>
+; KNL-NEXT: kmovw %k0, %ecx<br>
; KNL-NEXT: kshiftlw $1, %k1, %k0<br>
; KNL-NEXT: kshiftrw $15, %k0, %k0<br>
; KNL-NEXT: vmovd %r10d, %xmm1<br>
@@ -1812,12 +1828,12 @@ define void @store_64i1(<64 x i1>* %a, <<br>
; KNL-NEXT: vpinsrb $5, %r15d, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $6, %r12d, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $7, %r13d, %xmm0, %xmm0<br>
-; KNL-NEXT: vpinsrb $8, %ecx, %xmm0, %xmm0<br>
+; KNL-NEXT: vpinsrb $8, %edx, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $9, %esi, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $10, %ebp, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $11, %ebx, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $12, %eax, %xmm0, %xmm0<br>
-; KNL-NEXT: vpinsrb $13, %edx, %xmm0, %xmm0<br>
+; KNL-NEXT: vpinsrb $13, %ecx, %xmm0, %xmm0<br>
; KNL-NEXT: vpinsrb $14, %r10d, %xmm0, %xmm0<br>
; KNL-NEXT: kmovw %k1, %eax<br>
; KNL-NEXT: vpinsrb $15, %eax, %xmm0, %xmm0<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/av<wbr>x512dq-intrinsics.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/avx512dq-intrinsics.ll?<wbr>rev=274613&r1=274612&r2=<wbr>274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/av<wbr>x512dq-intrinsics.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/av<wbr>x512dq-intrinsics.ll Wed Jul 6 04:01:20 2016<br>
@@ -490,7 +490,6 @@ define i8 @test_int_x86_avx512_mask_fpcl<br>
; CHECK-NEXT: kmovw %edi, %k1<br>
; CHECK-NEXT: vfpclasssd $2, %xmm0, %k0 {%k1}<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: testb %al, %al<br>
; CHECK-NEXT: je LBB28_2<br>
; CHECK-NEXT: ## BB#1:<br>
@@ -498,7 +497,6 @@ define i8 @test_int_x86_avx512_mask_fpcl<br>
; CHECK-NEXT: LBB28_2:<br>
; CHECK-NEXT: vfpclasssd $4, %xmm0, %k0<br>
; CHECK-NEXT: kmovw %k0, %ecx<br>
-; CHECK-NEXT: andl $1, %ecx<br>
; CHECK-NEXT: testb %cl, %cl<br>
; CHECK-NEXT: je LBB28_4<br>
; CHECK-NEXT: ## BB#3:<br>
@@ -521,7 +519,6 @@ define i8 @test_int_x86_avx512_mask_fpcl<br>
; CHECK-NEXT: kmovw %edi, %k1<br>
; CHECK-NEXT: vfpclassss $4, %xmm0, %k0 {%k1}<br>
; CHECK-NEXT: kmovw %k0, %eax<br>
-; CHECK-NEXT: andl $1, %eax<br>
; CHECK-NEXT: testb %al, %al<br>
; CHECK-NEXT: je LBB29_2<br>
; CHECK-NEXT: ## BB#1:<br>
@@ -529,7 +526,6 @@ define i8 @test_int_x86_avx512_mask_fpcl<br>
; CHECK-NEXT: LBB29_2:<br>
; CHECK-NEXT: vfpclassss $4, %xmm0, %k0<br>
; CHECK-NEXT: kmovw %k0, %ecx<br>
-; CHECK-NEXT: andl $1, %ecx<br>
; CHECK-NEXT: testb %cl, %cl<br>
; CHECK-NEXT: je LBB29_4<br>
; CHECK-NEXT: ## BB#3:<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/ma<wbr>sked_gather_scatter.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/masked_gather_scatter.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/masked_gather_scatter.ll?<wbr>rev=274613&r1=274612&r2=<wbr>274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/ma<wbr>sked_gather_scatter.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/ma<wbr>sked_gather_scatter.ll Wed Jul 6 04:01:20 2016<br>
@@ -1367,12 +1367,9 @@ define <3 x i32> @test30(<3 x i32*> %bas<br>
; KNL_64-LABEL: test30:<br>
; KNL_64: # BB#0:<br>
; KNL_64-NEXT: andl $1, %edx<br>
-; KNL_64-NEXT: kmovw %edx, %k1<br>
; KNL_64-NEXT: andl $1, %esi<br>
-; KNL_64-NEXT: kmovw %esi, %k2<br>
; KNL_64-NEXT: movl %edi, %eax<br>
; KNL_64-NEXT: andl $1, %eax<br>
-; KNL_64-NEXT: kmovw %eax, %k0<br>
; KNL_64-NEXT: vpmovsxdq %xmm1, %ymm1<br>
; KNL_64-NEXT: vpsllq $2, %ymm1, %ymm1<br>
; KNL_64-NEXT: vpaddq %ymm1, %ymm0, %ymm1<br>
@@ -1380,81 +1377,76 @@ define <3 x i32> @test30(<3 x i32*> %bas<br>
; KNL_64-NEXT: testb $1, %dil<br>
; KNL_64-NEXT: je .LBB29_2<br>
; KNL_64-NEXT: # BB#1: # %cond.load<br>
-; KNL_64-NEXT: vmovq %xmm1, %rax<br>
-; KNL_64-NEXT: vmovd (%rax), %xmm0<br>
+; KNL_64-NEXT: vmovq %xmm1, %rcx<br>
+; KNL_64-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero<br>
; KNL_64-NEXT: .LBB29_2: # %else<br>
-; KNL_64-NEXT: kmovw %k2, %eax<br>
-; KNL_64-NEXT: movl %eax, %ecx<br>
-; KNL_64-NEXT: andl $1, %ecx<br>
-; KNL_64-NEXT: testb %cl, %cl<br>
+; KNL_64-NEXT: testb %sil, %sil<br>
; KNL_64-NEXT: je .LBB29_4<br>
; KNL_64-NEXT: # BB#3: # %cond.load1<br>
; KNL_64-NEXT: vpextrq $1, %xmm1, %rcx<br>
; KNL_64-NEXT: vpinsrd $1, (%rcx), %xmm0, %xmm0<br>
; KNL_64-NEXT: .LBB29_4: # %else2<br>
-; KNL_64-NEXT: kmovw %k1, %ecx<br>
-; KNL_64-NEXT: movl %ecx, %edx<br>
-; KNL_64-NEXT: andl $1, %edx<br>
; KNL_64-NEXT: testb %dl, %dl<br>
; KNL_64-NEXT: je .LBB29_6<br>
; KNL_64-NEXT: # BB#5: # %cond.load4<br>
; KNL_64-NEXT: vextracti128 $1, %ymm1, %xmm1<br>
-; KNL_64-NEXT: vmovq %xmm1, %rdx<br>
-; KNL_64-NEXT: vpinsrd $2, (%rdx), %xmm0, %xmm0<br>
+; KNL_64-NEXT: vmovq %xmm1, %rcx<br>
+; KNL_64-NEXT: vpinsrd $2, (%rcx), %xmm0, %xmm0<br>
; KNL_64-NEXT: .LBB29_6: # %else5<br>
-; KNL_64-NEXT: kmovw %k0, %edx<br>
-; KNL_64-NEXT: vmovd %edx, %xmm1<br>
-; KNL_64-NEXT: vpinsrd $1, %eax, %xmm1, %xmm1<br>
-; KNL_64-NEXT: vpinsrd $2, %ecx, %xmm1, %xmm1<br>
+; KNL_64-NEXT: vmovd %eax, %xmm1<br>
+; KNL_64-NEXT: vpinsrd $1, %esi, %xmm1, %xmm1<br>
+; KNL_64-NEXT: vpinsrd $2, %edx, %xmm1, %xmm1<br>
; KNL_64-NEXT: vpslld $31, %xmm1, %xmm1<br>
; KNL_64-NEXT: vblendvps %xmm1, %xmm0, %xmm2, %xmm0<br>
; KNL_64-NEXT: retq<br>
;<br>
; KNL_32-LABEL: test30:<br>
; KNL_32: # BB#0:<br>
+; KNL_32-NEXT: pushl %ebx<br>
+; KNL_32-NEXT: .Ltmp0:<br>
+; KNL_32-NEXT: .cfi_def_cfa_offset 8<br>
+; KNL_32-NEXT: pushl %esi<br>
+; KNL_32-NEXT: .Ltmp1:<br>
+; KNL_32-NEXT: .cfi_def_cfa_offset 12<br>
+; KNL_32-NEXT: .Ltmp2:<br>
+; KNL_32-NEXT: .cfi_offset %esi, -12<br>
+; KNL_32-NEXT: .Ltmp3:<br>
+; KNL_32-NEXT: .cfi_offset %ebx, -8<br>
; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax<br>
; KNL_32-NEXT: andl $1, %eax<br>
-; KNL_32-NEXT: kmovw %eax, %k1<br>
-; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax<br>
-; KNL_32-NEXT: andl $1, %eax<br>
-; KNL_32-NEXT: kmovw %eax, %k2<br>
-; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax<br>
-; KNL_32-NEXT: movl %eax, %ecx<br>
+; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %ecx<br>
; KNL_32-NEXT: andl $1, %ecx<br>
-; KNL_32-NEXT: kmovw %ecx, %k0<br>
+; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %ebx<br>
+; KNL_32-NEXT: movl %ebx, %edx<br>
+; KNL_32-NEXT: andl $1, %edx<br>
; KNL_32-NEXT: vpslld $2, %xmm1, %xmm1<br>
; KNL_32-NEXT: vpaddd %xmm1, %xmm0, %xmm1<br>
; KNL_32-NEXT: # implicit-def: %XMM0<br>
-; KNL_32-NEXT: testb $1, %al<br>
+; KNL_32-NEXT: testb $1, %bl<br>
; KNL_32-NEXT: je .LBB29_2<br>
; KNL_32-NEXT: # BB#1: # %cond.load<br>
-; KNL_32-NEXT: vmovd %xmm1, %eax<br>
-; KNL_32-NEXT: vmovd (%eax), %xmm0<br>
+; KNL_32-NEXT: vmovd %xmm1, %esi<br>
+; KNL_32-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero<br>
; KNL_32-NEXT: .LBB29_2: # %else<br>
-; KNL_32-NEXT: kmovw %k2, %eax<br>
-; KNL_32-NEXT: movl %eax, %ecx<br>
-; KNL_32-NEXT: andl $1, %ecx<br>
; KNL_32-NEXT: testb %cl, %cl<br>
; KNL_32-NEXT: je .LBB29_4<br>
; KNL_32-NEXT: # BB#3: # %cond.load1<br>
-; KNL_32-NEXT: vpextrd $1, %xmm1, %ecx<br>
-; KNL_32-NEXT: vpinsrd $1, (%ecx), %xmm0, %xmm0<br>
+; KNL_32-NEXT: vpextrd $1, %xmm1, %esi<br>
+; KNL_32-NEXT: vpinsrd $1, (%esi), %xmm0, %xmm0<br>
; KNL_32-NEXT: .LBB29_4: # %else2<br>
-; KNL_32-NEXT: kmovw %k1, %ecx<br>
-; KNL_32-NEXT: movl %ecx, %edx<br>
-; KNL_32-NEXT: andl $1, %edx<br>
-; KNL_32-NEXT: testb %dl, %dl<br>
+; KNL_32-NEXT: testb %al, %al<br>
; KNL_32-NEXT: je .LBB29_6<br>
; KNL_32-NEXT: # BB#5: # %cond.load4<br>
-; KNL_32-NEXT: vpextrd $2, %xmm1, %edx<br>
-; KNL_32-NEXT: vpinsrd $2, (%edx), %xmm0, %xmm0<br>
+; KNL_32-NEXT: vpextrd $2, %xmm1, %esi<br>
+; KNL_32-NEXT: vpinsrd $2, (%esi), %xmm0, %xmm0<br>
; KNL_32-NEXT: .LBB29_6: # %else5<br>
-; KNL_32-NEXT: kmovw %k0, %edx<br>
; KNL_32-NEXT: vmovd %edx, %xmm1<br>
-; KNL_32-NEXT: vpinsrd $1, %eax, %xmm1, %xmm1<br>
-; KNL_32-NEXT: vpinsrd $2, %ecx, %xmm1, %xmm1<br>
+; KNL_32-NEXT: vpinsrd $1, %ecx, %xmm1, %xmm1<br>
+; KNL_32-NEXT: vpinsrd $2, %eax, %xmm1, %xmm1<br>
; KNL_32-NEXT: vpslld $31, %xmm1, %xmm1<br>
; KNL_32-NEXT: vblendvps %xmm1, %xmm0, %xmm2, %xmm0<br>
+; KNL_32-NEXT: popl %esi<br>
+; KNL_32-NEXT: popl %ebx<br>
; KNL_32-NEXT: retl<br>
;<br>
; SKX-LABEL: test30:<br>
@@ -1471,7 +1463,7 @@ define <3 x i32> @test30(<3 x i32*> %bas<br>
; SKX-NEXT: je .LBB29_2<br>
; SKX-NEXT: # BB#1: # %cond.load<br>
; SKX-NEXT: vmovq %xmm1, %rax<br>
-; SKX-NEXT: vmovd (%rax), %xmm0<br>
+; SKX-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero<br>
; SKX-NEXT: .LBB29_2: # %else<br>
; SKX-NEXT: kmovb %k1, -{{[0-9]+}}(%rsp)<br>
; SKX-NEXT: movb -{{[0-9]+}}(%rsp), %al<br>
@@ -1645,12 +1637,12 @@ define <16 x i64> @test_gather_16i64(<16<br>
; KNL_32-LABEL: test_gather_16i64:<br>
; KNL_32: # BB#0:<br>
; KNL_32-NEXT: pushl %ebp<br>
-; KNL_32-NEXT: .Ltmp0:<br>
+; KNL_32-NEXT: .Ltmp4:<br>
; KNL_32-NEXT: .cfi_def_cfa_offset 8<br>
-; KNL_32-NEXT: .Ltmp1:<br>
+; KNL_32-NEXT: .Ltmp5:<br>
; KNL_32-NEXT: .cfi_offset %ebp, -8<br>
; KNL_32-NEXT: movl %esp, %ebp<br>
-; KNL_32-NEXT: .Ltmp2:<br>
+; KNL_32-NEXT: .Ltmp6:<br>
; KNL_32-NEXT: .cfi_def_cfa_register %ebp<br>
; KNL_32-NEXT: andl $-64, %esp<br>
; KNL_32-NEXT: subl $64, %esp<br>
@@ -1768,12 +1760,12 @@ define <16 x double> @test_gather_16f64(<br>
; KNL_32-LABEL: test_gather_16f64:<br>
; KNL_32: # BB#0:<br>
; KNL_32-NEXT: pushl %ebp<br>
-; KNL_32-NEXT: .Ltmp3:<br>
+; KNL_32-NEXT: .Ltmp7:<br>
; KNL_32-NEXT: .cfi_def_cfa_offset 8<br>
-; KNL_32-NEXT: .Ltmp4:<br>
+; KNL_32-NEXT: .Ltmp8:<br>
; KNL_32-NEXT: .cfi_offset %ebp, -8<br>
; KNL_32-NEXT: movl %esp, %ebp<br>
-; KNL_32-NEXT: .Ltmp5:<br>
+; KNL_32-NEXT: .Ltmp9:<br>
; KNL_32-NEXT: .cfi_def_cfa_register %ebp<br>
; KNL_32-NEXT: andl $-64, %esp<br>
; KNL_32-NEXT: subl $64, %esp<br>
@@ -1885,12 +1877,12 @@ define void @test_scatter_16i64(<16 x i6<br>
; KNL_32-LABEL: test_scatter_16i64:<br>
; KNL_32: # BB#0:<br>
; KNL_32-NEXT: pushl %ebp<br>
-; KNL_32-NEXT: .Ltmp6:<br>
+; KNL_32-NEXT: .Ltmp10:<br>
; KNL_32-NEXT: .cfi_def_cfa_offset 8<br>
-; KNL_32-NEXT: .Ltmp7:<br>
+; KNL_32-NEXT: .Ltmp11:<br>
; KNL_32-NEXT: .cfi_offset %ebp, -8<br>
; KNL_32-NEXT: movl %esp, %ebp<br>
-; KNL_32-NEXT: .Ltmp8:<br>
+; KNL_32-NEXT: .Ltmp12:<br>
; KNL_32-NEXT: .cfi_def_cfa_register %ebp<br>
; KNL_32-NEXT: andl $-64, %esp<br>
; KNL_32-NEXT: subl $64, %esp<br>
@@ -1999,12 +1991,12 @@ define void @test_scatter_16f64(<16 x do<br>
; KNL_32-LABEL: test_scatter_16f64:<br>
; KNL_32: # BB#0:<br>
; KNL_32-NEXT: pushl %ebp<br>
-; KNL_32-NEXT: .Ltmp9:<br>
+; KNL_32-NEXT: .Ltmp13:<br>
; KNL_32-NEXT: .cfi_def_cfa_offset 8<br>
-; KNL_32-NEXT: .Ltmp10:<br>
+; KNL_32-NEXT: .Ltmp14:<br>
; KNL_32-NEXT: .cfi_offset %ebp, -8<br>
; KNL_32-NEXT: movl %esp, %ebp<br>
-; KNL_32-NEXT: .Ltmp11:<br>
+; KNL_32-NEXT: .Ltmp15:<br>
; KNL_32-NEXT: .cfi_def_cfa_register %ebp<br>
; KNL_32-NEXT: andl $-64, %esp<br>
; KNL_32-NEXT: subl $64, %esp<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/pr<wbr>27591.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr27591.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/pr27591.ll?rev=274613&r1=<wbr>274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/pr<wbr>27591.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/pr<wbr>27591.ll Wed Jul 6 04:01:20 2016<br>
@@ -3,39 +3,48 @@ target datalayout = "e-m:e-i64:64-f80:12<br>
target triple = "x86_64-unknown-linux-gnu"<br>
<br>
define void @test1(i32 %x) #0 {<br>
+; CHECK-LABEL: test1:<br>
+; CHECK: # BB#0: # %entry<br>
+; CHECK-NEXT: pushq %rax<br>
+; CHECK-NEXT: testl %edi, %edi<br>
+; CHECK-NEXT: setne %al<br>
+; CHECK-NEXT: movb %al, %cl<br>
+; CHECK-NEXT: kmovw %ecx, %k0<br>
+; CHECK-NEXT: kmovb %k0, %eax<br>
+; CHECK-NEXT: andb $1, %al<br>
+; CHECK-NEXT: movzbl %al, %edi<br>
+; CHECK-NEXT: callq callee1<br>
+; CHECK-NEXT: popq %rax<br>
+; CHECK-NEXT: retq<br>
entry:<br>
%tobool = icmp ne i32 %x, 0<br>
call void @callee1(i1 zeroext %tobool)<br>
ret void<br>
}<br>
<br>
-; CHECK-LABEL: test1:<br>
-; CHECK: cmpl $0, %edi<br>
-; CHECK-NEXT: setne %al<br>
-; CHECK-NEXT: andb $1, %al<br>
-; CHECK-NEXT: movzbl %al, %edi<br>
-; CHECK-NEXT: callq callee1<br>
-<br>
define void @test2(i32 %x) #0 {<br>
+; CHECK-LABEL: test2:<br>
+; CHECK: # BB#0: # %entry<br>
+; CHECK-NEXT: pushq %rax<br>
+; CHECK-NEXT: testl %edi, %edi<br>
+; CHECK-NEXT: setne %al<br>
+; CHECK-NEXT: movb %al, %cl<br>
+; CHECK-NEXT: kmovw %ecx, %k0<br>
+; CHECK-NEXT: kmovw %k0, %ecx<br>
+; CHECK-NEXT: movb %cl, %al<br>
+; CHECK-NEXT: xorl %edi, %edi<br>
+; CHECK-NEXT: testb %al, %al<br>
+; CHECK-NEXT: movl $-1, %edx<br>
+; CHECK-NEXT: cmovnel %edx, %edi<br>
+; CHECK-NEXT: callq callee2<br>
+; CHECK-NEXT: popq %rax<br>
+; CHECK-NEXT: retq<br>
entry:<br>
%tobool = icmp ne i32 %x, 0<br>
call void @callee2(i1 signext %tobool)<br>
ret void<br>
}<br>
<br>
-; CHECK-LABEL: test2:<br>
-; CHECK: cmpl $0, %edi<br>
-; CHECK-NEXT: setne %al<br>
-; CHECK-NEXT: kmovb %eax, %k0<br>
-; CHECK-NEXT: kmovw %k0, %edi<br>
-; CHECK-NEXT: andl $1, %edi<br>
-; CHECK-NEXT: movb %dil, %al<br>
-; CHECK-NEXT: xorl %edi, %edi<br>
-; CHECK-NEXT: testb %al, %al<br>
-; CHECK-NEXT: movl $-1, %ecx<br>
-; CHECK-NEXT: cmovnel %ecx, %edi<br>
-; CHECK-NEXT: callq callee2<br>
-<br>
declare void @callee1(i1 zeroext)<br>
declare void @callee2(i1 signext)<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/pr<wbr>28173.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr28173.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/pr28173.ll?rev=274613&r1=<wbr>274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/pr<wbr>28173.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/pr<wbr>28173.ll Wed Jul 6 04:01:20 2016<br>
@@ -5,12 +5,12 @@ target triple = "x86_64-unknown-linux-gn<br>
; Note that the kmovs should really *not* appear in the output, this is an<br>
; artifact of the current poor lowering. This is tracked by PR28175.<br>
<br>
-; CHECK-LABEL: @foo64<br>
-; CHECK: kmov<br>
-; CHECK: kmov<br>
-; CHECK: orq $-2, %rax<br>
-; CHECK: ret<br>
define i64 @foo64(i1 zeroext %i, i32 %j) #0 {<br>
+; CHECK-LABEL: foo64:<br>
+; CHECK: # BB#0:<br>
+; CHECK-NEXT: orq $-2, %rdi<br>
+; CHECK-NEXT: movq %rdi, %rax<br>
+; CHECK-NEXT: retq<br>
br label %bb<br>
<br>
bb:<br>
@@ -22,12 +22,12 @@ end:<br>
ret i64 %v<br>
}<br>
<br>
-; CHECK-LABEL: @foo16<br>
-; CHECK: kmov<br>
-; CHECK: kmov<br>
-; CHECK: orl $65534, %eax<br>
-; CHECK: retq<br>
define i16 @foo16(i1 zeroext %i, i32 %j) #0 {<br>
+; CHECK-LABEL: foo16:<br>
+; CHECK: # BB#0:<br>
+; CHECK-NEXT: orl $65534, %edi # imm = 0xFFFE<br>
+; CHECK-NEXT: movl %edi, %eax<br>
+; CHECK-NEXT: retq<br>
br label %bb<br>
<br>
bb:<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/xa<wbr>luo.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xaluo.ll?rev=274613&r1=274612&r2=274613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/CodeGen/<wbr>X86/xaluo.ll?rev=274613&r1=<wbr>274612&r2=274613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/xa<wbr>luo.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/xa<wbr>luo.ll Wed Jul 6 04:01:20 2016<br>
@@ -738,10 +738,10 @@ define i1 @bug27873(i64 %c1, i1 %c2) {<br>
; KNL-LABEL: bug27873:<br>
; KNL: ## BB#0:<br>
; KNL-NEXT: andl $1, %esi<br>
+; KNL-NEXT: kmovw %esi, %k0<br>
; KNL-NEXT: movl $160, %ecx<br>
; KNL-NEXT: movq %rdi, %rax<br>
; KNL-NEXT: mulq %rcx<br>
-; KNL-NEXT: kmovw %esi, %k0<br>
; KNL-NEXT: seto %al<br>
; KNL-NEXT: kmovw %eax, %k1<br>
; KNL-NEXT: korw %k1, %k0, %k0<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>