<div dir="ltr">Hi Elena,<div><br></div><div>Thanks! I look forward to seeing your strided access intrinsics when they appear :)</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 November 2014 15:23, Demikhovsky, Elena <span dir="ltr"><<a href="mailto:elena.demikhovsky@intel.com" target="_blank">elena.demikhovsky@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Brief description:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">1) Store<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">call void @llvm.masked.store.v16i32(i8* %addr, <16 x i32>%val, i32 4, <16 x i1>%mask)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">store vector value %val under %addr, write only lanes where an appropriate %mask bit is on.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Number of elements in %mask and in %val should be the same.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">2) Load<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">%res = call <16 x float> @llvm.masked.load.v16f32(i8* %addr, <16 x float>%src0, i32 4, <16 x i1>%mask)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">load vector value from %addr, read only lanes where an appropriate %mask bit is on.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Number of elements in %mask and in %res and in %src0 should be the same.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Fill masked-off lanes with elements from %src0 (like “select”).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In the both cases don’t access memory under masked-off lanes.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Supported types depend on target.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Load/store mean consecutive access. I plan add intrinsics for the strided and random access in the future.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<u></u><span style="font-family:"Calibri","sans-serif";color:#31849b"><span>-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><u></u><span dir="LTR"></span><b><i><span style="color:#31849b"> Elena<u></u><u></u></span></i></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:mankeyrabbit@gmail.com" target="_blank">mankeyrabbit@gmail.com</a> [mailto:<a href="mailto:mankeyrabbit@gmail.com" target="_blank">mankeyrabbit@gmail.com</a>]
<b>On Behalf Of </b>James Molloy<br>
<b>Sent:</b> Monday, November 10, 2014 15:28<br>
<b>To:</b> <a href="mailto:reviews%2BD6191%2Bpublic%2Bd24d75579f47f6d4@reviews.llvm.org" target="_blank">reviews+D6191+public+d24d75579f47f6d4@reviews.llvm.org</a><br>
<b>Cc:</b> Demikhovsky, Elena; Adam Nemet; Hal Finkel; <a href="mailto:rob.khasanov@gmail.com" target="_blank">rob.khasanov@gmail.com</a>; Owen Anderson; LLVM Commits; <a href="mailto:nurmukhametov.alex@gmail.com" target="_blank">nurmukhametov.alex@gmail.com</a><br>
<b>Subject:</b> Re: [PATCH] Masked Vector Load/Store Intrinsics<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Elena,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There doesn't seem to be a change to LangRef here. Could you please briefly describe the semantics of masked load and store intrinsics?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">We have strided load/store instructions in NEON that could be modelled with them, depending on their semantics.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cheers,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">James<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 10 November 2014 13:19, Elena Demikhovsky <<a href="mailto:elena.demikhovsky@intel.com" target="_blank">elena.demikhovsky@intel.com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi anemet, hfinkel, rob.khasanov, resistor,<br>
<br>
Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer
 asks the target about availability of masked vector loads and stores.<br>
Added SDNodes for masked operations and lowering patterns for X86 code generator.<br>
<br>
Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch.<br>
<br>
<a href="http://reviews.llvm.org/D6191" target="_blank">http://reviews.llvm.org/D6191</a><br>
<br>
Files:<br>
  include/llvm/Analysis/TargetTransformInfo.h<br>
  include/llvm/CodeGen/ISDOpcodes.h<br>
  include/llvm/CodeGen/SelectionDAG.h<br>
  include/llvm/CodeGen/SelectionDAGNodes.h<br>
  include/llvm/IR/IRBuilder.h<br>
  include/llvm/IR/Intrinsics.h<br>
  include/llvm/IR/Intrinsics.td<br>
  include/llvm/Target/TargetSelectionDAG.td<br>
  lib/Analysis/TargetTransformInfo.cpp<br>
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp<br>
  lib/CodeGen/SelectionDAG/LegalizeTypes.h<br>
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp<br>
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp<br>
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp<br>
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h<br>
  lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp<br>
  lib/IR/Function.cpp<br>
  lib/IR/IRBuilder.cpp<br>
  lib/IR/Verifier.cpp<br>
  lib/Target/X86/X86ISelLowering.cpp<br>
  lib/Target/X86/X86InstrAVX512.td<br>
  lib/Target/X86/X86InstrSSE.td<br>
  lib/Target/X86/X86TargetTransformInfo.cpp<br>
  lib/Transforms/Vectorize/LoopVectorize.cpp<br>
  test/CodeGen/X86/masked_memop.ll<br>
  test/Transforms/LoopVectorize/X86/mask1.ll<br>
  test/Transforms/LoopVectorize/X86/mask2.ll<br>
  test/Transforms/LoopVectorize/X86/mask3.ll<br>
  test/Transforms/LoopVectorize/X86/mask4.ll<br>
  utils/TableGen/CodeGenTarget.cpp<br>
  utils/TableGen/IntrinsicEmitter.cpp<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></div>

</blockquote></div><br></div>